mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.0.b12891 mysql-test/r/ctype_utf8.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged
This commit is contained in:
commit
4aea99640c
3 changed files with 29 additions and 4 deletions
|
@ -551,11 +551,13 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
|
|||
}
|
||||
if (cs->mbmaxlen > 1)
|
||||
{
|
||||
uint safe_length1= char_length1;
|
||||
uint safe_length2= char_length2;
|
||||
uint char_length= seg->length / cs->mbmaxlen;
|
||||
char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length1);
|
||||
set_if_smaller(char_length1, seg->length);
|
||||
char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length2);
|
||||
set_if_smaller(char_length2, seg->length);
|
||||
char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length);
|
||||
set_if_smaller(char_length1, safe_length1);
|
||||
char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length);
|
||||
set_if_smaller(char_length2, safe_length2);
|
||||
}
|
||||
|
||||
if (cs->coll->strnncollsp(seg->charset,
|
||||
|
|
|
@ -1027,3 +1027,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;
|
||||
|
|
|
@ -863,3 +863,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;
|
||||
|
|
Loading…
Reference in a new issue