summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@bar.myoffice.izhnet.ru>2007-03-30 12:11:21 +0500
committerunknown <bar@bar.myoffice.izhnet.ru>2007-03-30 12:11:21 +0500
commit9aa4bf2fefec494dd06b2888088977cbe2d364a4 (patch)
tree46f9fe0a6a2b0be2845f8b048c53c608d156cacb /mysql-test
parent81a4074b6ee1e72c8360261d10ba4e4ba4216582 (diff)
parent905bc913fd9dc99640764e635dc82d67be46474a (diff)
downloadmariadb-git-9aa4bf2fefec494dd06b2888088977cbe2d364a4.tar.gz
Merge mysql.com:/home/bar/mysql-5.0.b22638
into mysql.com:/home/bar/mysql-5.1.test mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/ctype_utf8.test: Auto merged sql/item_strfunc.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_ucs.result18
-rw-r--r--mysql-test/r/ctype_utf8.result12
-rw-r--r--mysql-test/t/ctype_ucs.test14
-rw-r--r--mysql-test/t/ctype_utf8.test8
4 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index a65b19695ec..fcfe5d6345b 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -839,6 +839,24 @@ lily
river
drop table t1;
deallocate prepare stmt;
+set names latin1;
+set character_set_connection=ucs2;
+select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
+soundex('') soundex('he') soundex('hello all folks') soundex('#3556 in bugdb')
+ H000 H4142 I51231
+select hex(soundex('')),hex(soundex('he')),hex(soundex('hello all folks')),hex(soundex('#3556 in bugdb'));
+hex(soundex('')) hex(soundex('he')) hex(soundex('hello all folks')) hex(soundex('#3556 in bugdb'))
+ 0048003000300030 00480034003100340032 004900350031003200330031
+select 'mood' sounds like 'mud';
+'mood' sounds like 'mud'
+1
+select hex(soundex(_ucs2 0x041004110412));
+hex(soundex(_ucs2 0x041004110412))
+0410003000300030
+select hex(soundex(_ucs2 0x00BF00C0));
+hex(soundex(_ucs2 0x00BF00C0))
+00C0003000300030
+set names latin1;
create table t1(a blob, b text charset utf8, c text charset ucs2);
select data_type, character_octet_length, character_maximum_length
from information_schema.columns where table_name='t1';
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 37ef5e2756f..380cf2f227d 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -854,6 +854,18 @@ select * from t1 where soundex(a) = soundex('test');
id a
1 Test
drop table t1;
+select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
+soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)
+阅000
+select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
+hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB))
+E99885303030
+select soundex(_utf8 0xD091D092D093);
+soundex(_utf8 0xD091D092D093)
+Б000
+select hex(soundex(_utf8 0xD091D092D093));
+hex(soundex(_utf8 0xD091D092D093))
+D091303030
SET collation_connection='utf8_general_ci';
create table t1 select repeat('a',4000) a;
delete from t1;
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 5a3720dc431..c3320159c41 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -573,6 +573,20 @@ drop table t1;
deallocate prepare stmt;
#
+# Bug#22638 SOUNDEX broken for international characters
+#
+set names latin1;
+set character_set_connection=ucs2;
+select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
+select hex(soundex('')),hex(soundex('he')),hex(soundex('hello all folks')),hex(soundex('#3556 in bugdb'));
+select 'mood' sounds like 'mud';
+# Cyrillic A, BE, VE
+select hex(soundex(_ucs2 0x041004110412));
+# Make sure that "U+00BF INVERTED QUESTION MARK" is not considered as letter
+select hex(soundex(_ucs2 0x00BF00C0));
+set names latin1;
+
+#
# Bug #14290: character_maximum_length for text fields
#
create table t1(a blob, b text charset utf8, c text charset ucs2);
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 47a43258be1..c0060b7b813 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -702,6 +702,14 @@ select * from t1 where soundex(a) = soundex('TEST');
select * from t1 where soundex(a) = soundex('test');
drop table t1;
+#
+# Bug#22638 SOUNDEX broken for international characters
+#
+select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB);
+select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB));
+select soundex(_utf8 0xD091D092D093);
+select hex(soundex(_utf8 0xD091D092D093));
+
SET collation_connection='utf8_general_ci';
-- source include/ctype_filesort.inc