diff --git a/query_classifier/test/classify.c b/query_classifier/test/classify.c index 10f612c45..78d616845 100644 --- a/query_classifier/test/classify.c +++ b/query_classifier/test/classify.c @@ -76,6 +76,10 @@ char* get_types_as_string(uint32_t types) { s = append(s, "QUERY_TYPE_SESSION_WRITE", &len); } + if (types & QUERY_TYPE_USERVAR_WRITE) + { + s = append(s, "QUERY_TYPE_USERVAR_WRITE", &len); + } if (types & QUERY_TYPE_USERVAR_READ) { s = append(s, "QUERY_TYPE_USERVAR_READ", &len); diff --git a/query_classifier/test/expected.sql b/query_classifier/test/expected.sql index 55a350bd2..d971d5969 100644 --- a/query_classifier/test/expected.sql +++ b/query_classifier/test/expected.sql @@ -28,3 +28,7 @@ QUERY_TYPE_WRITE QUERY_TYPE_WRITE QUERY_TYPE_WRITE QUERY_TYPE_GSYSVAR_WRITE +QUERY_TYPE_READ +QUERY_TYPE_READ +QUERY_TYPE_USERVAR_WRITE +QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ diff --git a/query_classifier/test/input.sql b/query_classifier/test/input.sql index 3575bcb40..43fc0af57 100644 --- a/query_classifier/test/input.sql +++ b/query_classifier/test/input.sql @@ -25,6 +25,10 @@ SELECT IS_USED_LOCK('lock1'); SELECT RELEASE_LOCK('lock1'); deallocate prepare select_stmt; SELECT a FROM tbl FOR UPDATE; -SELECT a INTO OUTFILE 'out.txt' -SELECT a INTO DUMPFILE 'dump.txt' +SELECT a INTO OUTFILE 'out.txt'; +SELECT a INTO DUMPFILE 'dump.txt'; SELECT a INTO @var; +select timediff(cast('2004-12-30 12:00:00' as time), '12:00:00'); +(select 1 as a from t1) union all (select 1 from dual) limit 1; +SET @saved_cs_client= @@character_set_client; +SELECT 1 AS c1 FROM t1 ORDER BY ( SELECT 1 AS c2 FROM t1 GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ORDER BY GREATEST(LAST_INSERT_ID(), t1.a) LIMIT 1);