MXS-2699 Accept '_[character_set] hex' as string
The purpose is to recognize e.g. /_utf8mb4 0xD091D092D093/ as a valid string. The rule actually accepts /id integer/, but in case the statement is something else but an '_' immediately followed by a character set, followed by a hex number, it will be rejected by the server so no harm done.
This commit is contained in:
parent
c01ecfed05
commit
a9f07844b3
@ -1926,6 +1926,13 @@ expr(A) ::= VARIABLE(X). {
|
||||
spanSet(&A, &X, &X);
|
||||
}
|
||||
%ifdef MAXSCALE
|
||||
expr(A) ::= id(X) INTEGER(Y). {
|
||||
// The sole purpose of this is to interpret something like '_utf8mb4 0xD091D092D093'
|
||||
// as a string. It does not matter that any identifier followed by an integer will
|
||||
// be interpreted as a string, as invalid usage will be caught by the server.
|
||||
A.pExpr = sqlite3PExpr(pParse, TK_STRING, 0, 0, &Y);
|
||||
spanSet(&A, &X, &Y);
|
||||
}
|
||||
expr(A) ::= VARIABLE(X) variable_tail(Y). {
|
||||
// As we won't be executing any queries, we do not need to do
|
||||
// the things that are done above.
|
||||
|
Loading…
x
Reference in New Issue
Block a user