From 0a3ba13450843caa802326ac1739caa1005c36b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 24 Jun 2022 12:01:19 +0200 Subject: [PATCH] More queries to test for Clickhouse Server --- test/tap/tests/test_clickhouse_server-t.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/tap/tests/test_clickhouse_server-t.cpp b/test/tap/tests/test_clickhouse_server-t.cpp index 9041770f9d..e5c9fc8110 100644 --- a/test/tap/tests/test_clickhouse_server-t.cpp +++ b/test/tap/tests/test_clickhouse_server-t.cpp @@ -139,7 +139,7 @@ int create_users(MYSQL *pa) { if (result) { int j = fetch_and_discard_results(result, true); mysql_free_result(result); - ok(j==4, "Line %d : Rows in clickhouse_users should be 0. Actual: %d" , __LINE__, j); + ok(j==4, "Line %d : Rows in clickhouse_users should be 4. Actual: %d" , __LINE__, j); } else { ok(false,"Line %d : Query failed: %s . Error: %s", __LINE__, q, mysql_error(pa)); return exit_status(); @@ -240,6 +240,8 @@ std::vector queries_set1 { std::make_tuple("SELECT 1+1", 0, 1), std::make_tuple("SELECT CONCAT('AAA','BBB')", 0, 1), std::make_tuple("SELECT NULL", 0, 1), + std::make_tuple("SELECT NULL AS a", 0, 1), + std::make_tuple("SELECT NULL+2 AS a, 'hello', NULL+1, 'world', NULL AS b", 0, 1), std::make_tuple("SELECT CONCAT('AAA',NULL)", 0, 1), std::make_tuple("DROP TABLE IF EXISTS table1", 0, -1), std::make_tuple("CREATE TABLE table1 (CounterID INT, EventDate DATE, col1 INT) ENGINE=MergeTree(EventDate, (CounterID, EventDate), 8192)", 0, -1),