summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_misc.test
diff options
context:
space:
mode:
authorSreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>2016-05-24 07:44:21 +0530
committerSreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>2016-05-24 07:44:21 +0530
commit115f08284df1dac6a29cbca49dc7534b4a4f23f7 (patch)
tree127c0ab7551bb1dc9c2df63b117af0b033bc6adf /mysql-test/t/func_misc.test
parent4de9d9c261a6f2a32e98920bbc530c473b41de07 (diff)
downloadmariadb-git-115f08284df1dac6a29cbca49dc7534b4a4f23f7.tar.gz
Bug #23279858: MYSQLD GOT SIGNAL 11 ON SIMPLE SELECT
NAME_CONST QUERY ISSUE: ------ Using NAME_CONST with a non-constant negated expression as value can result in incorrect behavior. SOLUTION: --------- The problem can be avoided by checking whether the argument is a constant value. The fix is a backport of Bug#12735545.
Diffstat (limited to 'mysql-test/t/func_misc.test')
-rw-r--r--mysql-test/t/func_misc.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 9257314013d..c13b506ad6f 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -544,3 +544,13 @@ DROP TABLE t1;
--echo #
--echo # End of tests
--echo #
+
+#
+# Bug#12735545 - PARSER STACK OVERFLOW WITH NAME_CONST
+# CONTAINING OR EXPRESSION
+#
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
+SELECT NAME_CONST('a', -(1)) OR 1;