mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#12891:
UNION doesn't return DISTINCT result for multi-byte characters hp_hash.c: This piece of code was pretty wrong, looks like no necessary changes were made after cut-and-paste from fixed length segment processing. Itroduced two new variables safe_length1 and safe_length2 to remember the original lengths. Fixing my_charpos and set_if_smaller calls to pass correct parameters. ctype_utf8.result, ctype_utf8.test: adding test case heap/hp_hash.c: Bug#12891: UNION doesn't return DISTINCT result for multi-byte characters This piece of code was pretty wrong. mysql-test/t/ctype_utf8.test: adding test case mysql-test/r/ctype_utf8.result: adding test case
This commit is contained in:
@ -1023,3 +1023,15 @@ aa
|
||||
xxx
|
||||
yyy
|
||||
DROP TABLE t1;
|
||||
set names utf8;
|
||||
create table t1 (a char(1)) default character set utf8;
|
||||
create table t2 (a char(1)) default character set utf8;
|
||||
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
|
||||
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
|
||||
select * from t1 union distinct select * from t2;
|
||||
a
|
||||
a
|
||||
あ
|
||||
i
|
||||
い
|
||||
drop table t1,t2;
|
||||
|
@ -857,3 +857,14 @@ SELECT DISTINCT id FROM t1;
|
||||
SELECT DISTINCT id FROM t1 ORDER BY id;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#12891: UNION doesn't return DISTINCT result for multi-byte characters
|
||||
#
|
||||
set names utf8;
|
||||
create table t1 (a char(1)) default character set utf8;
|
||||
create table t2 (a char(1)) default character set utf8;
|
||||
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
|
||||
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
|
||||
select * from t1 union distinct select * from t2;
|
||||
drop table t1,t2;
|
||||
|
Reference in New Issue
Block a user