diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/create_w_max_indexes_64.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/create_w_max_indexes_64.test')
-rw-r--r-- | mysql-test/main/create_w_max_indexes_64.test | 334 |
1 files changed, 334 insertions, 0 deletions
diff --git a/mysql-test/main/create_w_max_indexes_64.test b/mysql-test/main/create_w_max_indexes_64.test new file mode 100644 index 00000000000..6e614ecf2e5 --- /dev/null +++ b/mysql-test/main/create_w_max_indexes_64.test @@ -0,0 +1,334 @@ +--source include/no_valgrind_without_big.inc +--source include/have_max_indexes_64.inc +# +# 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, c18 int,c19 int,c20 int,c21 int,c22 int,c23 int,c24 int,c25 int,c26 int,c27 int,c28 int,c29 int,c30 int,c31 int,c32 int, c33 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,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33); + +# 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 tests" |