diff options
author | unknown <bar@mysql.com> | 2006-03-23 14:29:43 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-03-23 14:29:43 +0400 |
commit | 278b83a84dd0f8c129f6a31fe32772c37ababe86 (patch) | |
tree | efccf5ca05b9432ec5ae0da53c26273dc6398723 /mysql-test | |
parent | 49d2b4f0616c62826452c4d8e36a79c78d080516 (diff) | |
parent | a464e01713d19d358eb7feab2cfdf88bb274d5df (diff) | |
download | mariadb-git-278b83a84dd0f8c129f6a31fe32772c37ababe86.tar.gz |
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b15376
include/m_ctype.h:
Auto merged
strings/ctype-bin.c:
Auto merged
strings/ctype-euc_kr.c:
Auto merged
strings/ctype-gb2312.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_big5.result | 3 | ||||
-rw-r--r-- | mysql-test/r/ctype_gbk.result | 3 | ||||
-rw-r--r-- | mysql-test/r/ctype_ujis.result | 6 | ||||
-rw-r--r-- | mysql-test/t/ctype_big5.test | 10 | ||||
-rw-r--r-- | mysql-test/t/ctype_gbk.test | 10 | ||||
-rw-r--r-- | mysql-test/t/ctype_ujis.test | 15 |
6 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index 4c5832a57e9..6574908101c 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -189,3 +189,6 @@ select hex(a) from t1 where a = _big5 0xF9DC; hex(a) E5ABBA drop table t1; +select hex(convert(_big5 0xC84041 using ucs2)); +hex(convert(_big5 0xC84041 using ucs2)) +003F0041 diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index aaffe692126..241539ecf42 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -165,3 +165,6 @@ hex(a) A1A1 A3A0 DROP TABLE t1; +select hex(convert(_gbk 0xA14041 using ucs2)); +hex(convert(_gbk 0xA14041 using ucs2)) +003F0041 diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index c86cbe9ce53..77258ba1730 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -2307,3 +2307,9 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; c2h ab_def drop table t1; +select hex(convert(_ujis 0xA5FE41 using ucs2)); +hex(convert(_ujis 0xA5FE41 using ucs2)) +003F0041 +select hex(convert(_ujis 0x8FABF841 using ucs2)); +hex(convert(_ujis 0x8FABF841 using ucs2)) +003F0041 diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test index ffe2a12234e..200002cd235 100644 --- a/mysql-test/t/ctype_big5.test +++ b/mysql-test/t/ctype_big5.test @@ -53,4 +53,14 @@ alter table t1 convert to character set utf8; select hex(a) from t1 where a = _big5 0xF9DC; drop table t1; +# +# Bugs#15375: Unassigned multibyte codes are broken +# into parts when converting to Unicode. +# This query should return 0x003F0041. I.e. it should +# scan unassigned double-byte character 0xC840, convert +# it as QUESTION MARK 0x003F and then scan the next +# character, which is a single byte character 0x41. +# +select hex(convert(_big5 0xC84041 using ucs2)); + # End of 4.1 tests diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test index 5eeade96186..7aec48586d8 100644 --- a/mysql-test/t/ctype_gbk.test +++ b/mysql-test/t/ctype_gbk.test @@ -31,4 +31,14 @@ INSERT INTO t1 VALUES (0xA3A0),(0xA1A1); SELECT hex(a) FROM t1 ORDER BY a; DROP TABLE t1; +# +# Bugs#15375: Unassigned multibyte codes are broken +# into parts when converting to Unicode. +# This query should return 0x003F0041. I.e. it should +# scan unassigned double-byte character 0xA140, convert +# it as QUESTION MARK 0x003F and then scan the next +# character, which is a single byte character 0x41. +# +select hex(convert(_gbk 0xA14041 using ucs2)); + # End of 4.1 tests diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test index bf74371510b..12d05f44a94 100644 --- a/mysql-test/t/ctype_ujis.test +++ b/mysql-test/t/ctype_ujis.test @@ -1152,4 +1152,19 @@ SET collation_connection='ujis_bin'; -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc +# +# Bugs#15375: Unassigned multibyte codes are broken +# into parts when converting to Unicode. +# This query should return 0x003F0041. I.e. it should +# scan unassigned double-byte character 0xA5FE, convert +# it as QUESTION MARK 0x003F and then scan the next +# character, which is a single byte character 0x41. +# +select hex(convert(_ujis 0xA5FE41 using ucs2)); +# This one should return 0x003F0041: +# scan unassigned three-byte character 0x8FABF8, +# convert it as QUESTION MARK 0x003F and then scan +# the next character, which is a single byte character 0x41. +select hex(convert(_ujis 0x8FABF841 using ucs2)); + # End of 4.1 tests |