From 4413c0cec014e5f71bad3af5d379dc8a1d6223a3 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 21 Mar 2018 13:23:44 +0200 Subject: [PATCH 1/3] Update version to 2.1.16 --- VERSION21.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION21.cmake b/VERSION21.cmake index 8c38fa841..32d2ff0f4 100644 --- a/VERSION21.cmake +++ b/VERSION21.cmake @@ -5,7 +5,7 @@ set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version") set(MAXSCALE_VERSION_MINOR "1" CACHE STRING "Minor version") -set(MAXSCALE_VERSION_PATCH "15" CACHE STRING "Patch version") +set(MAXSCALE_VERSION_PATCH "16" CACHE STRING "Patch version") # This should only be incremented if a package is rebuilt set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number") From 5be9a8d7f8b425b544ad7da95b5954ba99577023 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 21 Mar 2018 11:13:26 +0200 Subject: [PATCH 2/3] MXS-1730 Add test-case that reveals the problem --- query_classifier/test/maxscale.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/query_classifier/test/maxscale.test b/query_classifier/test/maxscale.test index e2fda41d4..be5803134 100644 --- a/query_classifier/test/maxscale.test +++ b/query_classifier/test/maxscale.test @@ -94,4 +94,7 @@ select id from db2.t1 where SUBDATE("2017-06-15", INTERVAL 10 DAY) < "2017-06-15 select id from db2.t1 where DATE_ADD("2017-06-15", INTERVAL 10 DAY) < "2017-06-15"; select id from db2.t1 where ADDDATE("2017-06-15", INTERVAL 10 DAY) < "2017-06-15"; SELECT '2008-12-31 23:59:59' + INTERVAL 1 SECOND; -SELECT '2005-01-01' - INTERVAL 1 SECOND; \ No newline at end of file +SELECT '2005-01-01' - INTERVAL 1 SECOND; + +# MXS-1730 +SELECT id as engine FROM users WHERE id = 1; From 041b7751503a075a8d07e8fda0d784e29dd6365a Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 21 Mar 2018 11:14:16 +0200 Subject: [PATCH 3/3] MXS-1730 Add change that fixes the problem ENGINE is a keyword but not a reserved word, so it must silently convert into an identifier if it is used in a context where it cannot be used as a keyword. --- query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y b/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y index fad997933..73c0e489a 100644 --- a/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y +++ b/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y @@ -596,7 +596,7 @@ columnid(A) ::= nm(X). { BINARY /*CASCADE*/ CAST CLOSE COLUMNKW COLUMNS COMMENT CONCURRENT /*CONFLICT*/ DATA /*DATABASE*/ DEALLOCATE DEFERRED /*DESC*/ /*DETACH*/ DUMPFILE - /*EACH*/ END ENUM EXCLUSIVE /*EXPLAIN*/ + /*EACH*/ END ENGINE ENUM EXCLUSIVE /*EXPLAIN*/ FIRST FLUSH /*FOR*/ GLOBAL // TODO: IF is a reserved word and should not automatically convert into an identifer.