summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_misc.test
diff options
context:
space:
mode:
authorgluh@eagle.(none) <>2007-12-13 14:52:49 +0400
committergluh@eagle.(none) <>2007-12-13 14:52:49 +0400
commite03959502978f9a7056b4adf6ba7c2a25f648b14 (patch)
treeb870e5e7b713672711344eb2e5b585f3e2c48375 /mysql-test/t/func_misc.test
parent9217f011361bf7c09f05692c409f52d553ce9690 (diff)
parent9f4f6acc53d1f9472def4a6f3fa650f6e72b1d6a (diff)
downloadmariadb-git-e03959502978f9a7056b4adf6ba7c2a25f648b14.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
Diffstat (limited to 'mysql-test/t/func_misc.test')
-rw-r--r--mysql-test/t/func_misc.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 844e60ab7ae..82db9ddbd67 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -205,6 +205,21 @@ SELECT NAME_CONST('test', -1.0);
SELECT NAME_CONST('test', 'test');
#
+# Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter
+# resolved against a column name of a derived table hangs the client
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (5), (2);
+
+--error ER_RESERVED_SYNTAX
+SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t;
+
+DROP TABLE t1;
+
+--echo End of 5.0 tests
+
+#
# Bug #32559: connection hangs on query with name_const
#
CREATE TABLE t1(a INT);
@@ -224,3 +239,4 @@ select min(a) from t1 group by inet_ntoa(a);
drop table t1;
--echo End of 5.0 tests
+