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

@ -929,9 +929,11 @@ public:
case TK_BITOR:
case TK_CASE:
case TK_CAST:
case TK_DIV:
case TK_IN:
case TK_ISNULL:
case TK_MINUS:
case TK_MOD:
case TK_NOTNULL:
case TK_PLUS:
case TK_SLASH:
@ -4011,6 +4013,9 @@ static const char* get_token_symbol(int token)
case TK_CAST:
return "cast";
case TK_DIV:
return "div";
case TK_IN:
return "in";
@ -4020,6 +4025,9 @@ static const char* get_token_symbol(int token)
case TK_MINUS:
return "-";
case TK_MOD:
return "mod";
case TK_NOTNULL:
return "isnotnull";