summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2004-10-14 14:14:50 +0500
committerunknown <bar@mysql.com>2004-10-14 14:14:50 +0500
commit81914f489ea2d9b838acdb93318c8d3549e03d55 (patch)
treee6dd8da123b6a0004ace0158a653a4df8170f35d /mysql-test
parent761ae02ca77722f34744a912315d52a0c0f7fca6 (diff)
downloadmariadb-git-81914f489ea2d9b838acdb93318c8d3549e03d55.tar.gz
Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_utf8.result29
-rw-r--r--mysql-test/t/ctype_utf8.test20
2 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 0b98d9432ae..0ed3444581c 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -750,3 +750,32 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd");
id
4
DROP TABLE t1;
+SET NAMES latin1;
+CREATE TABLE t1 (
+id int unsigned NOT NULL auto_increment,
+list_id smallint unsigned NOT NULL,
+term text NOT NULL,
+PRIMARY KEY(id),
+INDEX(list_id, term(19))
+) TYPE=MyISAM CHARSET=utf8;
+Warnings:
+Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
+INSERT INTO t1 set list_id = 1, term = "testétest";
+INSERT INTO t1 set list_id = 1, term = "testetest";
+INSERT INTO t1 set list_id = 1, term = "testètest";
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testétest");
+id term
+1 testétest
+2 testetest
+3 testètest
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testetest");
+id term
+1 testétest
+2 testetest
+3 testètest
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testètest");
+id term
+1 testétest
+2 testetest
+3 testètest
+DROP TABLE t1;
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 4a8eb63ed36..36aeec7145e 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -592,3 +592,23 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterb");
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "lettera");
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd");
DROP TABLE t1;
+
+
+#
+# Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table
+#
+SET NAMES latin1;
+CREATE TABLE t1 (
+ id int unsigned NOT NULL auto_increment,
+ list_id smallint unsigned NOT NULL,
+ term text NOT NULL,
+ PRIMARY KEY(id),
+ INDEX(list_id, term(19))
+) TYPE=MyISAM CHARSET=utf8;
+INSERT INTO t1 set list_id = 1, term = "testétest";
+INSERT INTO t1 set list_id = 1, term = "testetest";
+INSERT INTO t1 set list_id = 1, term = "testètest";
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testétest");
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testetest");
+SELECT id, term FROM t1 where (list_id = 1) AND (term = "testètest");
+DROP TABLE t1;