diff --git a/query_classifier/test/canonical_tests/Makefile b/query_classifier/test/canonical_tests/Makefile index 6db90ac17..3d69507ec 100644 --- a/query_classifier/test/canonical_tests/Makefile +++ b/query_classifier/test/canonical_tests/Makefile @@ -26,10 +26,10 @@ LDFLAGS=-L$(QUERY_CLASSIFIER_PATH) \ -Wl,-rpath,$(LOG_MANAGER_PATH) \ -Wl,-rpath,$(QUERY_CLASSIFIER_PATH) -LIBS=-lpthread -lquery_classifier -lz -ldl -lssl -laio -lcrypt -lcrypto -lrt \ +LIBS=-lstdc++ -lpthread -lquery_classifier -lz -ldl -lssl -laio -lcrypt -lcrypto -lrt \ -llog_manager $(UTILS_PATH)/skygw_utils.o $(CORE_PATH)/buffer.o $(CORE_PATH)/atomic.o $(CORE_PATH)/spinlock.o -CFLAGS=$ -g $(MYSQL_HEADERS) \ +CFLAGS=-g $(MYSQL_HEADERS) \ -I$(QUERY_CLASSIFIER_PATH) \ $(MYSQL_HEADERS) \ -I$(ROOT_PATH)/server/include \ diff --git a/query_classifier/test/canonical_tests/expected.sql b/query_classifier/test/canonical_tests/expected.sql index e1db906af..9ba3aa925 100755 --- a/query_classifier/test/canonical_tests/expected.sql +++ b/query_classifier/test/canonical_tests/expected.sql @@ -4,3 +4,10 @@ select ?,?,?,?,?,? from tst select * from tst where fname like '?' select * from tst where lname like '?' order by fname insert into tst values ("?","?"),("?",?),("?","?") +drop table if exists tst +create table tst(fname varchar(30), lname varchar(30)) +update tst set lname="?" where fname like '?' or lname like '?' +delete from tst where lname like '?' and fname like '?' +select ? from tst where fname='?' or lname like '?' +select ?,?,?,? from tst where name='?' or name='?' or name='?' +select count(?),count(?),count(?),count(?),count (?),count(?) from tst diff --git a/query_classifier/test/canonical_tests/input.sql b/query_classifier/test/canonical_tests/input.sql index 5e0410761..192db761c 100755 --- a/query_classifier/test/canonical_tests/input.sql +++ b/query_classifier/test/canonical_tests/input.sql @@ -4,7 +4,10 @@ select 1,2,3,4,5,6 from tst; select * from tst where fname like '%a%'; select * from tst where lname like '%e%' order by fname; insert into tst values ("John","Doe"),("Plato",null),("Nietzsche",""); -select md5("200000foo") =10, sleep(2), rand(100); -select * from my1 where md5("110") =10; -select md5("100foo") =10; -select * from my1 where md5("100") =10; +drop table if exists tst; +create table tst(fname varchar(30), lname varchar(30)); +update tst set lname="Human" where fname like '%a%' or lname like '%a%'; +delete from tst where lname like '%man%' and fname like '%ard%'; +select 100 from tst where fname='10' or lname like '%100%'; +select 1,20,300,4000 from tst where name='1000' or name='200' or name='30' or name='4'; +select count(1),count(10),count(100),count(2),count (20),count(200) from tst;