summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-24 17:24:05 +0200
committerunknown <serg@serg.mylan>2004-08-24 17:24:05 +0200
commit62a63815e119807134de74edb78e478b75a6b874 (patch)
tree0510e008df4096d499dc65b1d38de5d8af9369c7 /mysql-test/t
parent63d253171d5d7e8790dc1fe668335aea28209f79 (diff)
parentb033e3dfbb9d15e40887cde9914f99a41b304cad (diff)
downloadmariadb-git-62a63815e119807134de74edb78e478b75a6b874.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/ctype_utf8.test64
1 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 83055d05830..4624f2ec78c 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -294,6 +294,30 @@ select c as c_a from t1 where c='a';
select c as c_a from t1 where c='б';
drop table t1;
+#
+# Bug 4531: unique key prefix interacts poorly with utf8
+# Check BDB, case insensitive collation
+#
+--disable_warnings
+create table t1 (
+c char(10) character set utf8,
+unique key a (c(1))
+) engine=bdb;
+--enable_warnings
+insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
+--error 1062
+insert into t1 values ('aa');
+--error 1062
+insert into t1 values ('aaa');
+insert into t1 values ('б');
+--error 1062
+insert into t1 values ('бб');
+--error 1062
+insert into t1 values ('ббб');
+select c as c_all from t1 order by c;
+select c as c_a from t1 where c='a';
+select c as c_a from t1 where c='б';
+drop table t1;
#
# Bug 4521: unique key prefix interacts poorly with utf8
@@ -393,6 +417,31 @@ select c as c_a from t1 where c='a';
select c as c_a from t1 where c='б';
drop table t1;
+#
+# Bug 4531: unique key prefix interacts poorly with utf8
+# Check BDB, binary collation
+#
+--disable_warnings
+create table t1 (
+c char(10) character set utf8 collate utf8_bin,
+unique key a (c(1))
+) engine=bdb;
+--enable_warnings
+insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
+--error 1062
+insert into t1 values ('aa');
+--error 1062
+insert into t1 values ('aaa');
+insert into t1 values ('б');
+--error 1062
+insert into t1 values ('бб');
+--error 1062
+insert into t1 values ('ббб');
+select c as c_all from t1 order by c;
+select c as c_a from t1 where c='a';
+select c as c_a from t1 where c='б';
+drop table t1;
+
# Bug#4594: column index make = failed for gbk, but like works
# Check MYISAM
@@ -429,3 +478,18 @@ INSERT INTO t1 VALUES ('str');
INSERT INTO t1 VALUES ('str2');
select * from t1 where str='str';
drop table t1;
+
+# the same for BDB
+#
+
+--disable_warnings
+create table t1 (
+ str varchar(255) character set utf8 not null,
+ key str (str(2))
+) engine=bdb;
+--enable_warnings
+INSERT INTO t1 VALUES ('str');
+INSERT INTO t1 VALUES ('str2');
+select * from t1 where str='str';
+drop table t1;
+