MXS-2508 Fix problem

DIV and MOD are now also accepted instead of / and % respectively.
MOD is a keyword but (in principle incorrectly) decays into an id
when used in some other context. That is so that it will be
parser by the general function rule ("id ( ... )"). If used
incorrectly, the server will later reject.
This commit is contained in:
Johan Wikman
2020-03-03 10:40:02 +02:00
parent be3be3bf99
commit ee8e43f26b
3 changed files with 16 additions and 2 deletions

View File

@ -242,6 +242,7 @@ static Keyword aKeywordTable[] = {
{ "DISTINCT", "TK_DISTINCT", ALWAYS },
#ifdef MAXSCALE
{ "DISTINCTROW", "TK_DISTINCT", ALWAYS },
{ "DIV", "TK_DIV", ALWAYS },
{ "DO", "TK_DO", ALWAYS },
#endif
{ "DROP", "TK_DROP", ALWAYS },
@ -349,6 +350,7 @@ static Keyword aKeywordTable[] = {
#ifdef MAXSCALE
{ "MASTER", "TK_MASTER", ALWAYS },
{ "MERGE", "TK_MERGE", ALWAYS },
{ "MOD", "TK_MOD", ALWAYS },
{ "NAMES", "TK_NAMES", ALWAYS },
#endif
{ "NATURAL", "TK_JOIN_KW", ALWAYS },