diff --git a/server/modules/protocol/MySQL/MySQLClient/setsqlmodeparser.hh b/server/modules/protocol/MySQL/MySQLClient/setsqlmodeparser.hh index 1595e7727..97afebdd7 100644 --- a/server/modules/protocol/MySQL/MySQLClient/setsqlmodeparser.hh +++ b/server/modules/protocol/MySQL/MySQLClient/setsqlmodeparser.hh @@ -588,6 +588,11 @@ private: token = expect_token(MXS_CP_EXPECT_TOKEN("GLOBAL"), TK_GLOBAL); break; + case 'l': + case 'L': + token = expect_token(MXS_CP_EXPECT_TOKEN("LOCAL"), TK_SESSION); + break; + case 'o': case 'O': token = expect_token(MXS_CP_EXPECT_TOKEN("ORACLE"), TK_ORACLE); diff --git a/server/modules/protocol/MySQL/MySQLClient/test/test_setsqlmodeparser.cc b/server/modules/protocol/MySQL/MySQLClient/test/test_setsqlmodeparser.cc index 6eac09cb6..33454a286 100644 --- a/server/modules/protocol/MySQL/MySQLClient/test/test_setsqlmodeparser.cc +++ b/server/modules/protocol/MySQL/MySQLClient/test/test_setsqlmodeparser.cc @@ -120,6 +120,21 @@ struct TEST_CASE P::IS_SET_SQL_MODE, P::ORACLE }, + { + "SET GLOBAL SQL_MODE=ORACLE", + P::IS_SET_SQL_MODE, + P::ORACLE + }, + { + "SET SESSION SQL_MODE=ORACLE", + P::IS_SET_SQL_MODE, + P::ORACLE + }, + { + "SET LOCAL SQL_MODE=ORACLE", + P::IS_SET_SQL_MODE, + P::ORACLE + }, }; const int N_TEST_CASES = sizeof(test_cases)/sizeof(test_cases[0]);