1#include "catch.hpp"
2#include "test_helpers.hpp"
3
4using namespace duckdb;
5using namespace std;
6
7TEST_CASE("Test ANALYZE", "[analyze]") {
8 unique_ptr<QueryResult> result;
9 DuckDB db(nullptr);
10 Connection con(db);
11 con.EnableQueryVerification();
12
13 // ANALYZE runs without errors, note that ANALYZE is actually just ignored
14 REQUIRE_NO_FAIL(con.Query("ANALYZE"));
15 REQUIRE_NO_FAIL(con.Query("VACUUM"));
16
17 auto prep = con.Prepare("ANALYZE");
18 REQUIRE(prep->success);
19 auto res = prep->Execute();
20 REQUIRE(res->success);
21
22 prep = con.Prepare("VACUUM");
23 REQUIRE(prep->success);
24 res = prep->Execute();
25 REQUIRE(res->success);
26}
27