mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -300,3 +300,13 @@ SELECT '1' IN ('1', INET_NTOA(0));
|
||||
|
||||
|
||||
--echo End of tests
|
||||
|
||||
#
|
||||
# MDEV-5655 Server crashes on NAME_CONST containing AND/OR expressions
|
||||
#
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
SELECT NAME_CONST('a', -(1 AND 2)) AND 1;
|
||||
SELECT NAME_CONST('a', -(1)) OR 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user