summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@bar.myoffice.izhnet.ru>2007-07-03 14:06:57 +0500
committerunknown <bar@bar.myoffice.izhnet.ru>2007-07-03 14:06:57 +0500
commitc45f8f949f485fe04d1ce633c6b11ceefae07a59 (patch)
tree60ca8f903635b8471342d77aa9cdb3877195aadc /mysql-test
parent7119687e262e28950c0d1d5ee2c8ff35d2bb38ba (diff)
parent7edcebc97a817f7b157df86504e937600a2716d2 (diff)
downloadmariadb-git-c45f8f949f485fe04d1ce633c6b11ceefae07a59.tar.gz
Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b27345
into mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl strings/ctype-uca.c: Auto merged strings/ctype-mb.c: After merge fix. strings/ctype-ucs2.c: After merge fix.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_uca.result92
-rw-r--r--mysql-test/t/ctype_uca.test54
2 files changed, 146 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 1fd1493bf1e..889702e380c 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -2663,3 +2663,95 @@ COUNT(*) c1
1
1 a
DROP TABLE IF EXISTS t1;
+set names utf8;
+create table t1 (
+a varchar(255),
+key a(a)
+) character set utf8 collate utf8_danish_ci;
+insert into t1 values ('åaaaa'),('ååaaa'),('aaaaa');
+select a as like_a from t1 where a like 'a%';
+like_a
+aaaaa
+select a as like_aa from t1 where a like 'aa%';
+like_aa
+aaaaa
+select a as like_aaa from t1 where a like 'aaa%';
+like_aaa
+aaaaa
+select a as like_aaaa from t1 where a like 'aaaa%';
+like_aaaa
+aaaaa
+select a as like_aaaaa from t1 where a like 'aaaaa%';
+like_aaaaa
+aaaaa
+alter table t1 convert to character set ucs2 collate ucs2_danish_ci;
+select a as like_a from t1 where a like 'a%';
+like_a
+aaaaa
+select a as like_aa from t1 where a like 'aa%';
+like_aa
+aaaaa
+select a as like_aaa from t1 where a like 'aaa%';
+like_aaa
+aaaaa
+select a as like_aaaa from t1 where a like 'aaaa%';
+like_aaaa
+aaaaa
+select a as like_aaaaa from t1 where a like 'aaaaa%';
+like_aaaaa
+aaaaa
+drop table t1;
+create table t1 (
+a varchar(255),
+key(a)
+) character set utf8 collate utf8_spanish2_ci;
+insert into t1 values ('aaaaa'),('lllll'),('zzzzz');
+select a as like_l from t1 where a like 'l%';
+like_l
+lllll
+select a as like_ll from t1 where a like 'll%';
+like_ll
+lllll
+select a as like_lll from t1 where a like 'lll%';
+like_lll
+lllll
+select a as like_llll from t1 where a like 'llll%';
+like_llll
+lllll
+select a as like_lllll from t1 where a like 'lllll%';
+like_lllll
+lllll
+alter table t1 convert to character set ucs2 collate ucs2_spanish2_ci;
+select a as like_l from t1 where a like 'l%';
+like_l
+lllll
+select a as like_ll from t1 where a like 'll%';
+like_ll
+lllll
+select a as like_lll from t1 where a like 'lll%';
+like_lll
+lllll
+select a as like_llll from t1 where a like 'llll%';
+like_llll
+lllll
+select a as like_lllll from t1 where a like 'lllll%';
+like_lllll
+lllll
+drop table t1;
+create table t1 (
+a varchar(255),
+key a(a)
+) character set utf8 collate utf8_czech_ci;
+insert into t1 values
+('b'),('c'),('d'),('e'),('f'),('g'),('h'),('ch'),('i'),('j');
+select * from t1 where a like 'c%';
+a
+c
+ch
+alter table t1 convert to character set ucs2 collate ucs2_czech_ci;
+select * from t1 where a like 'c%';
+a
+c
+ch
+drop table t1;
+End for 5.0 tests
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index 64349bc40a6..17632e7c8fc 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -485,3 +485,57 @@ CREATE TABLE t1 (
insert into t1 values (''),('a');
SELECT COUNT(*), c1 FROM t1 GROUP BY c1;
DROP TABLE IF EXISTS t1;
+
+#
+# Bug#27345 Incorrect data returned when range-read from utf8_danish_ci indexes
+#
+set names utf8;
+create table t1 (
+ a varchar(255),
+ key a(a)
+) character set utf8 collate utf8_danish_ci;
+insert into t1 values ('åaaaa'),('ååaaa'),('aaaaa');
+select a as like_a from t1 where a like 'a%';
+select a as like_aa from t1 where a like 'aa%';
+select a as like_aaa from t1 where a like 'aaa%';
+select a as like_aaaa from t1 where a like 'aaaa%';
+select a as like_aaaaa from t1 where a like 'aaaaa%';
+alter table t1 convert to character set ucs2 collate ucs2_danish_ci;
+select a as like_a from t1 where a like 'a%';
+select a as like_aa from t1 where a like 'aa%';
+select a as like_aaa from t1 where a like 'aaa%';
+select a as like_aaaa from t1 where a like 'aaaa%';
+select a as like_aaaaa from t1 where a like 'aaaaa%';
+drop table t1;
+
+create table t1 (
+ a varchar(255),
+ key(a)
+) character set utf8 collate utf8_spanish2_ci;
+insert into t1 values ('aaaaa'),('lllll'),('zzzzz');
+select a as like_l from t1 where a like 'l%';
+select a as like_ll from t1 where a like 'll%';
+select a as like_lll from t1 where a like 'lll%';
+select a as like_llll from t1 where a like 'llll%';
+select a as like_lllll from t1 where a like 'lllll%';
+alter table t1 convert to character set ucs2 collate ucs2_spanish2_ci;
+select a as like_l from t1 where a like 'l%';
+select a as like_ll from t1 where a like 'll%';
+select a as like_lll from t1 where a like 'lll%';
+select a as like_llll from t1 where a like 'llll%';
+select a as like_lllll from t1 where a like 'lllll%';
+drop table t1;
+
+create table t1 (
+ a varchar(255),
+ key a(a)
+) character set utf8 collate utf8_czech_ci;
+-- In Czech 'ch' is a single letter between 'h' and 'i'
+insert into t1 values
+('b'),('c'),('d'),('e'),('f'),('g'),('h'),('ch'),('i'),('j');
+select * from t1 where a like 'c%';
+alter table t1 convert to character set ucs2 collate ucs2_czech_ci;
+select * from t1 where a like 'c%';
+drop table t1;
+
+-- echo End for 5.0 tests