From 38863bd319aa718c134f704e9308a97b4f56ae1d Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 23 May 2017 15:52:22 +0300 Subject: [PATCH] MXS-1196: Handle "exit" correctly "exit" is both a mysqltest and PL/SQL keyword. --- query_classifier/test/testreader.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/query_classifier/test/testreader.cc b/query_classifier/test/testreader.cc index c4cca20ed..36a0101a4 100644 --- a/query_classifier/test/testreader.cc +++ b/query_classifier/test/testreader.cc @@ -158,11 +158,11 @@ skip_action_t get_action(const string& keyword, const string& delimiter) std::transform(key.begin(), key.end(), key.begin(), ::tolower); - // "while" is both a mysqltest and PL/SQL keyword. We use the - // heuristic that if the delimiter is something else but ";" + // "while" and "exit" are both mysqltest and PL/SQL keywords. We use + // the heuristic that if the delimiter is something else but ";" // we assume it used in a PL/SQL context. - if ((key != "while") || (delimiter == ";")) + if ((delimiter == ";") || ((key != "while") && (key != "exit"))) { KeywordActionMapping::iterator i = mtl_keywords.find(key);