mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5655 Server crashes on NAME_CONST containing AND/OR expressions
fix the NAME_CONST check to only allow literals, negated literals, and literals with the explicit collation.
This commit is contained in:
@ -265,3 +265,10 @@ SELECT '1' IN ('1', INET_NTOA(0));
|
||||
'1' IN ('1', INET_NTOA(0))
|
||||
1
|
||||
End of tests
|
||||
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
|
||||
ERROR HY000: Incorrect arguments to NAME_CONST
|
||||
SELECT NAME_CONST('a', -(1 AND 2)) AND 1;
|
||||
ERROR HY000: Incorrect arguments to NAME_CONST
|
||||
SELECT NAME_CONST('a', -(1)) OR 1;
|
||||
NAME_CONST('a', -(1)) OR 1
|
||||
1
|
||||
|
Reference in New Issue
Block a user