From b212117fd304a9c64e191a839bc72c206d332e0a Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 13 May 2020 10:38:07 +0300 Subject: [PATCH] MXS-2990 Fix the problem, treat ! as not If '!' is followed by '=' then it is NOT-EQUAL, otherwise it is just NOT. --- query_classifier/qc_sqlite/sqlite-src-3110100/src/tokenize.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/query_classifier/qc_sqlite/sqlite-src-3110100/src/tokenize.c b/query_classifier/qc_sqlite/sqlite-src-3110100/src/tokenize.c index 05070b107..fc958424b 100644 --- a/query_classifier/qc_sqlite/sqlite-src-3110100/src/tokenize.c +++ b/query_classifier/qc_sqlite/sqlite-src-3110100/src/tokenize.c @@ -419,8 +419,13 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){ } case CC_BANG: { if( z[1]!='=' ){ +#ifdef MAXSCALE + *tokenType = TK_NOT; + return 1; +#else *tokenType = TK_ILLEGAL; return 2; +#endif }else{ *tokenType = TK_NE; return 2;