From e64b034334b42ece7282bdd28111b7b58db58ef5 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 8 Jan 2019 20:23:21 +0200 Subject: [PATCH] MXS-2248 Add change that fixes the problem Any kind of expression is legal after INTERVAL. --- query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9310d4d38..d6a8eab66 100644 --- a/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y +++ b/query_classifier/qc_sqlite/sqlite-src-3110100/src/parse.y @@ -2110,10 +2110,10 @@ expr(A) ::= expr(X) BITAND|BITOR|LSHIFT|RSHIFT(OP) expr(Y). expr(A) ::= expr(X) PLUS|MINUS(OP) expr(Y). {spanBinaryExpr(&A,pParse,@OP,&X,&Y);} %ifdef MAXSCALE -expr(A) ::= INTERVAL INTEGER(X) id. { +expr(A) ::= INTERVAL expr(X) id. { // Here we could check that id is one of MICROSECOND, SECOND, MINUTE // HOUR, DAY, WEEK, etc. - spanExpr(&A, pParse, @X, &X); + A=X; // We simply ignore 'INTERVAL' } %endif expr(A) ::= expr(X) STAR|SLASH|REM(OP) expr(Y).