diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-02-05 11:43:39 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-02-05 11:43:39 +0400 |
commit | 909d29ee05a61b919ac0caaee8ddbff527d679de (patch) | |
tree | e19c468677d8eaea06a43927c41a959d437ce37e /mysql-test/t/func_misc.test | |
parent | 69cd86934d0b861f53ea309d0bfb52870902cbe9 (diff) | |
download | mariadb-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.test | 9 |
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 |