summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_misc.test
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2009-02-05 11:43:39 +0400
committerRamil Kalimullin <ramil@mysql.com>2009-02-05 11:43:39 +0400
commit909d29ee05a61b919ac0caaee8ddbff527d679de (patch)
treee19c468677d8eaea06a43927c41a959d437ce37e /mysql-test/t/func_misc.test
parent69cd86934d0b861f53ea309d0bfb52870902cbe9 (diff)
downloadmariadb-git-909d29ee05a61b919ac0caaee8ddbff527d679de.tar.gz
Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...) lead to server crash due to failed type cast. Fix: return the underlying item's type in case of NAME_CONST(.. COLLATE ...) to avoid wrong casting.
Diffstat (limited to 'mysql-test/t/func_misc.test')
-rw-r--r--mysql-test/t/func_misc.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 93fe94ec94f..c8075c42fc7 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -436,5 +436,14 @@ select @my_uuid_date - @my_uuid_synthetic;
set @@session.time_zone=@save_tz;
+
+#
+# Bug#42014: Crash, name_const with collate
+#
+CREATE TABLE t1 (a DATE);
+SELECT * FROM t1 WHERE a = NAME_CONST('reportDate',
+ _binary'2009-01-09' COLLATE 'binary');
+DROP TABLE t1;
+
--echo End of 5.0 tests