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 | 91d23568edbe67a9658f6a78093f9d3c12d23499 (patch) | |
tree | e19c468677d8eaea06a43927c41a959d437ce37e /mysql-test/r/func_misc.result | |
parent | 9b93c2684c5af408eefd713736007e9cee29c9a4 (diff) | |
download | mariadb-git-91d23568edbe67a9658f6a78093f9d3c12d23499.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.
mysql-test/r/func_misc.result:
Fix for bug#42014: Crash, name_const with coll
- test result.
mysql-test/t/func_misc.test:
Fix for bug#42014: Crash, name_const with coll
- test case.
sql/item.cc:
Fix for bug#42014: Crash, name_const with coll
- in case of NAME_CONST('name', 'value' COLLATE collation)
Item_name_const::type() returns type of 'value' argument
to awoid wrong type casting of the Item_name_const items.
Diffstat (limited to 'mysql-test/r/func_misc.result')
-rw-r--r-- | mysql-test/r/func_misc.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index ce177b511b9..e57d46c006a 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -319,4 +319,9 @@ select @my_uuid_date - @my_uuid_synthetic; @my_uuid_date - @my_uuid_synthetic 0 set @@session.time_zone=@save_tz; +CREATE TABLE t1 (a DATE); +SELECT * FROM t1 WHERE a = NAME_CONST('reportDate', +_binary'2009-01-09' COLLATE 'binary'); +a +DROP TABLE t1; End of 5.0 tests |