summaryrefslogtreecommitdiff
path: root/mysql-test/t/create.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-06-27 14:35:49 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-06-27 14:35:49 +0300
commit0c31d0bbd77aac2848d58963e4fc5df3e4a2b86c (patch)
treed80e17c0c5da470c174748ea9e75d11232310913 /mysql-test/t/create.test
parent39ef7a533ed82a2a686ec46bbdfec206d4520520 (diff)
downloadmariadb-git-0c31d0bbd77aac2848d58963e4fc5df3e4a2b86c.tar.gz
Bug #26642: create index corrupts table definition in .frm
Thanks to Martin Friebe for finding and submitting a fix for this bug! A table with maximum number of key segments and maximum length key name would have a corrupted .frm file, due to an incorrect calculation of the complete key length. Now the key length is computed correctly (I hope) :-) MyISAM would reject a table with the maximum number of keys and the maximum number of key segments in all keys. It would allow one less than this total maximum. Now MyISAM accepts a table defined with the maximum. (This is a very minor issue.) myisam/mi_open.c: Bug #26642: change >= to > in a comparison (i.e., error only if key_parts_in_table really is greater than MAX_KEY * MAX_KEY_SEG) mysql-test/r/create.result: Bug #26642: test case mysql-test/t/create.test: Bug #26642: test case sql/table.cc: Bug #26642: In create_frm(), fix formula for key_length; it was too small by (keys * 2) bytes
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r--mysql-test/t/create.test333
1 files changed, 333 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 35198c793b8..99f3fea416a 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -786,4 +786,337 @@ drop table t1, t2;
create table t1 (upgrade int);
drop table t1;
+
+#
+# Bug #26642: create index corrupts table definition in .frm
+#
+# Problem with creating keys with maximum key-parts and maximum name length
+# This test is made for a mysql server supporting names up to 64 bytes
+# and a maximum of 16 key segements per Key
+#
+
+create table t1 (
+ c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int,
+ c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int,
+
+ key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16)
+);
+
+# Check that the table is not corrupted
+show create table t1;
+flush tables;
+show create table t1;
+
+# Repeat test using ALTER to add indexes
+
+drop table t1;
+create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int,
+c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int);
+
+alter table t1
+
+ add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+
+ add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
+ add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);
+
+show create table t1;
+flush tables;
+show create table t1;
+
+# Test the server limits; if any of these pass, all above tests need
+# to be rewritten to hit the limit
+#
+# Ensure limit is really 64 keys
+--error 1069
+alter table t1 add key
+ a065_long_123456789_123456789_123456789_123456789_123456789_1234 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);
+
+drop table t1;
+
+# Ensure limit is really 16 key parts per key
+
+create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int,
+c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int,
+c16 int, c17 int);
+
+# Get error for max key parts
+--error 1070
+alter table t1 add key i1 (
+ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16, c17);
+
+# Get error for max key-name length
+--error 1059
+alter table t1 add key
+ a001_long_123456789_123456789_123456789_123456789_123456789_12345 (c1);
+
+show create table t1;
+
+drop table t1;
+
+
--echo End of 5.0 tests