summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_misc.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-12 21:17:28 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-12 21:17:28 +0100
commit52f038c5c3a065d2c68197535d844f6ed00a09cc (patch)
tree4448c8f0baa6a59eb39034c6b92ce2020d18c52f /mysql-test/r/func_misc.result
parent16e0cae0ccaf1e744d29c55cc96b8d9a53e589c0 (diff)
downloadmariadb-git-52f038c5c3a065d2c68197535d844f6ed00a09cc.tar.gz
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.
Diffstat (limited to 'mysql-test/r/func_misc.result')
-rw-r--r--mysql-test/r/func_misc.result7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 5910a45c839..56d27ff78be 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -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