mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#41627 Illegal mix of collations in LEAST / GREATEST / CASE
Don't throw an error after checking the first and the second arguments. Continue with checking the third and higher arguments and if some of them is stronger according to coercibility rules, then this argument's collation is set as result collation. mysql-test/r/ctype_collate.result: test result mysql-test/t/ctype_collate.test: test case sql/item.cc: Don't throw an error after checking the first and the second arguments. Continue with checking the third and higher arguments and if some of them is stronger according to coercibility rules, then this argument's collation is set as result collation.
This commit is contained in:
@ -229,3 +229,17 @@ insert into t1 set a=0x6c;
|
||||
insert into t1 set a=0x4c98;
|
||||
check table t1 extended;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#41627 Illegal mix of collations in LEAST / GREATEST / CASE
|
||||
#
|
||||
select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci);
|
||||
create table t1
|
||||
select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci) as f1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
select case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate
|
||||
latin5_turkish_ci then 2 else 3 end;
|
||||
|
||||
select concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci);
|
||||
|
Reference in New Issue
Block a user