diff --git a/query_classifier/test/CMakeLists.txt b/query_classifier/test/CMakeLists.txt index 0f2b69609..08e3bfbfe 100644 --- a/query_classifier/test/CMakeLists.txt +++ b/query_classifier/test/CMakeLists.txt @@ -36,11 +36,12 @@ target_link_libraries(crash_qc_sqlite maxscale-common) add_test(TestQC_Crash_qcsqlite crash_qc_sqlite) +add_test(TestQC_SqLite classify qc_sqlite ${CMAKE_CURRENT_SOURCE_DIR}/input.sql ${CMAKE_CURRENT_SOURCE_DIR}/expected.sql) + if (BUILD_QC_MYSQLEMBEDDED) # TestQC_MySQLEmbedded excluded, classify is now solely used for verifying the # functionality of qc_sqlite. #add_test(TestQC_MySQLEmbedded classify qc_mysqlembedded ${CMAKE_CURRENT_SOURCE_DIR}/input.sql ${CMAKE_CURRENT_SOURCE_DIR}/expected.sql) - add_test(TestQC_SqLite classify qc_sqlite ${CMAKE_CURRENT_SOURCE_DIR}/input.sql ${CMAKE_CURRENT_SOURCE_DIR}/expected.sql) add_test(TestQC_CompareCreate compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/create.test) add_test(TestQC_CompareDelete compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/delete.test) diff --git a/query_classifier/test/expected.sql b/query_classifier/test/expected.sql index ae7b22f3a..ab6b488ef 100644 --- a/query_classifier/test/expected.sql +++ b/query_classifier/test/expected.sql @@ -35,3 +35,4 @@ QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ QUERY_TYPE_WRITE QUERY_TYPE_READ QUERY_TYPE_WRITE +QUERY_TYPE_WRITE diff --git a/query_classifier/test/input.sql b/query_classifier/test/input.sql index bf00b8b78..f488d8b92 100644 --- a/query_classifier/test/input.sql +++ b/query_classifier/test/input.sql @@ -35,3 +35,4 @@ SELECT 1 AS c1 FROM t1 ORDER BY ( SELECT 1 AS c2 FROM t1 GROUP BY GREATEST(LAST_ SET PASSWORD FOR 'user'@'10.0.0.1'='*C50EB75D7CB4C76B5264218B92BC69E6815B057A'; SELECT UTC_TIMESTAMP(); SELECT COUNT(IF(!c.ispackage, 1, NULL)) as cnt FROM test FOR UPDATE; +SELECT handler FROM abc FOR UPDATE;