summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-23 11:51:46 +0400
committerunknown <bar@mysql.com>2006-03-23 11:51:46 +0400
commit49d2b4f0616c62826452c4d8e36a79c78d080516 (patch)
tree30720736dc229ff0436fc0d9841172aaa8ee6fbf /mysql-test
parent7913527eb8c9c9722a343e0fde54a4e271fae222 (diff)
parent83bc8c4e389305290cae4b9ed7fc89f9a348eb44 (diff)
downloadmariadb-git-49d2b4f0616c62826452c4d8e36a79c78d080516.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b17374
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_latin2_ch.inc4
-rw-r--r--mysql-test/r/ctype_latin2_ch.result30
-rw-r--r--mysql-test/r/have_latin2_ch.require2
-rw-r--r--mysql-test/t/ctype_latin2_ch.test30
4 files changed, 66 insertions, 0 deletions
diff --git a/mysql-test/include/have_latin2_ch.inc b/mysql-test/include/have_latin2_ch.inc
new file mode 100644
index 00000000000..9d3ee6b341c
--- /dev/null
+++ b/mysql-test/include/have_latin2_ch.inc
@@ -0,0 +1,4 @@
+-- require r/have_latin2_ch.require
+disable_query_log;
+show collation like "latin2_czech_cs";
+enable_query_log;
diff --git a/mysql-test/r/ctype_latin2_ch.result b/mysql-test/r/ctype_latin2_ch.result
new file mode 100644
index 00000000000..2b3765c07c4
--- /dev/null
+++ b/mysql-test/r/ctype_latin2_ch.result
@@ -0,0 +1,30 @@
+drop table if exists t1;
+set names latin2;
+select 'A' = 'a' collate latin2_czech_cs;
+'A' = 'a' collate latin2_czech_cs
+0
+create table t1 (
+id int(5) not null,
+tt char(255) not null
+) character set latin2 collate latin2_czech_cs;
+insert into t1 values (1,'Aa');
+insert into t1 values (2,'Aas');
+alter table t1 add primary key aaa(tt);
+select * from t1 where tt like 'Aa%';
+id tt
+1 Aa
+2 Aas
+select * from t1 ignore index (primary) where tt like 'Aa%';
+id tt
+1 Aa
+2 Aas
+select * from t1 where tt like '%Aa%';
+id tt
+1 Aa
+2 Aas
+select * from t1 where tt like 'AA%';
+id tt
+select * from t1 ignore index (primary) where tt like 'AA%';
+id tt
+select * from t1 where tt like '%AA%';
+id tt
diff --git a/mysql-test/r/have_latin2_ch.require b/mysql-test/r/have_latin2_ch.require
new file mode 100644
index 00000000000..352401bbfe8
--- /dev/null
+++ b/mysql-test/r/have_latin2_ch.require
@@ -0,0 +1,2 @@
+Collation Charset Id Default Compiled Sortlen
+latin2_czech_cs latin2 2 Yes 4
diff --git a/mysql-test/t/ctype_latin2_ch.test b/mysql-test/t/ctype_latin2_ch.test
new file mode 100644
index 00000000000..626d83fa17d
--- /dev/null
+++ b/mysql-test/t/ctype_latin2_ch.test
@@ -0,0 +1,30 @@
+-- source include/have_latin2_ch.inc
+
+#
+# Tests with latin2_czech_cs
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Bug#17374: select ... like 'A%' operator fails
+# to find value on columuns with key
+#
+set names latin2;
+select 'A' = 'a' collate latin2_czech_cs;
+create table t1 (
+ id int(5) not null,
+ tt char(255) not null
+) character set latin2 collate latin2_czech_cs;
+insert into t1 values (1,'Aa');
+insert into t1 values (2,'Aas');
+alter table t1 add primary key aaa(tt);
+select * from t1 where tt like 'Aa%';
+select * from t1 ignore index (primary) where tt like 'Aa%';
+select * from t1 where tt like '%Aa%';
+select * from t1 where tt like 'AA%';
+select * from t1 ignore index (primary) where tt like 'AA%';
+select * from t1 where tt like '%AA%';
+
+# End of 4.1 tests