summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-02-20 20:38:34 +0100
committerunknown <serg@serg.mylan>2004-02-20 20:38:34 +0100
commit74fa5f09ef7ef6433423f93378bbc070c091d9b0 (patch)
tree40b5e6cdb83d2a91c45651388dc4d63cd2a3fa84 /mysql-test/t
parente2244c94b1f29d176e441e86b7162f520eaa50b2 (diff)
downloadmariadb-git-74fa5f09ef7ef6433423f93378bbc070c091d9b0.tar.gz
longer myisam keys
mysql-test/r/ctype_utf8.result: updated mysql-test/r/key.result: updated mysql-test/r/myisam.result: updated mysql-test/r/type_blob.result: updated mysql-test/t/ctype_utf8.test: updated mysql-test/t/key.test: updated mysql-test/t/myisam.test: updated mysql-test/t/type_blob.test: updated
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/ctype_utf8.test2
-rw-r--r--mysql-test/t/key.test13
-rw-r--r--mysql-test/t/myisam.test6
-rw-r--r--mysql-test/t/type_blob.test4
4 files changed, 19 insertions, 6 deletions
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 6361f49fe55..797af89c6ad 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -104,4 +104,4 @@ drop table t1;
# UTF8 breaks primary keys for cols > 85 characters
#
--error 1071
-create table t1 (a char(160) character set utf8, primary key(a));
+create table t1 (a text character set utf8, primary key(a(360)));
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index 109cbb91e2f..cdaf6062771 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -191,3 +191,16 @@ SELECT * FROM t1;
INSERT INTO t1 (c) VALUES ('a'),('a');
SELECT * FROM t1;
drop table t1;
+
+#
+# longer keys
+#
+create table t1 (i int, a char(200), b text, unique (a), unique (b(300))) charset utf8;
+insert t1 values (1, repeat('a',210), repeat('b', 310));
+insert t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
+select i, length(a), length(b), char_length(a), char_length(b) from t1;
+select i from t1 where a=repeat(_utf8 'a',200);
+select i from t1 where a=repeat(_utf8 0xD0B1,200);
+select i from t1 where b=repeat(_utf8 'b',310);
+drop table t1;
+
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index c407cba4800..65bc4f1fff6 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -337,10 +337,10 @@ drop table t1;
#
--error 1071
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c));
-CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255), KEY t1 (a, b, c, d, e));
+CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), d varchar(255), e varchar(255));
--error 1071
-ALTER TABLE t1 ADD INDEX t1 (a, b, c);
+ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
DROP TABLE t1;
#
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index 97c38057e72..cae64b9dd27 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -122,8 +122,8 @@ select d,count(*) from t1 group by d;
drop table t1;
-- error 1071
-create table t1 (a text, unique (a(300))); # should give an error
-create table t1 (a text, key (a(300))); # key is auto-truncated
+create table t1 (a text, unique (a(2100))); # should give an error
+create table t1 (a text, key (a(2100))); # key is auto-truncated
show create table t1;
drop table t1;