~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1,t2,t3,t4,t5;
2
drop database if exists mysqltest;
3
create table t1 (b char(0));
4
insert into t1 values (""),(null);
5
select * from t1;
6
b
7
8
NULL
9
drop table if exists t1;
10
create table t1 (b char(0) not null);
11
create table if not exists t1 (b char(0) not null);
12
Warnings:
13
Note	1050	Table 't1' already exists
14
insert into t1 values (""),(null);
15
Warnings:
16
Warning	1048	Column 'b' cannot be null
17
select * from t1;
18
b
19
20
21
drop table t1;
22
create table t1 (a int not null auto_increment,primary key (a)) engine=heap;
23
drop table t1;
24
create table t2 engine=heap select * from t1;
25
ERROR 42S02: Table 'test.t1' doesn't exist
26
create table t2 select auto+1 from t1;
27
ERROR 42S02: Table 'test.t1' doesn't exist
28
drop table if exists t1,t2;
29
Warnings:
30
Note	1051	Unknown table 't1'
31
Note	1051	Unknown table 't2'
32
create table t1 (b char(0) not null, index(b));
33
ERROR 42000: The used storage engine can't index column 'b'
34
create table t1 (a int not null,b text) engine=heap;
35
ERROR 42000: The used table type doesn't support BLOB/TEXT columns
36
drop table if exists t1;
37
Warnings:
38
Note	1051	Unknown table 't1'
39
create table t1 (ordid int(8) not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=heap;
40
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
41
create table not_existing_database.test (a int);
42
ERROR 42000: Unknown database 'not_existing_database'
43
create table `a/a` (a int);
44
show create table `a/a`;
45
Table	Create Table
46
a/a	CREATE TABLE `a/a` (
47
  `a` int(11) DEFAULT NULL
48
) ENGINE=MyISAM DEFAULT CHARSET=latin1
49
create table t1 like `a/a`;
50
drop table `a/a`;
51
drop table `t1`;
52
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
53
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
54
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
55
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
56
create table t1 (a datetime default now());
57
ERROR 42000: Invalid default value for 'a'
58
create table t1 (a datetime on update now());
59
ERROR HY000: Invalid ON UPDATE clause for 'a' column
60
create table t1 (a int default 100 auto_increment);
61
ERROR 42000: Invalid default value for 'a'
62
create table t1 (a tinyint default 1000);
63
ERROR 42000: Invalid default value for 'a'
64
create table t1 (a varchar(5) default 'abcdef');
65
ERROR 42000: Invalid default value for 'a'
66
create table t1 (a varchar(5) default 'abcde');
67
insert into t1 values();
68
select * from t1;
69
a
70
abcde
71
alter table t1 alter column a set default 'abcdef';
72
ERROR 42000: Invalid default value for 'a'
73
drop table t1;
74
create table 1ea10 (1a20 int,1e int);
75
insert into 1ea10 values(1,1);
76
select 1ea10.1a20,1e+ 1e+10 from 1ea10;
77
1a20	1e+ 1e+10
78
1	10000000001
79
drop table 1ea10;
80
create table t1 (t1.index int);
81
drop table t1;
82
drop database if exists mysqltest;
83
Warnings:
84
Note	1008	Can't drop database 'mysqltest'; database doesn't exist
85
create database mysqltest;
86
create table mysqltest.$test1 (a$1 int, $b int, c$ int);
87
insert into mysqltest.$test1 values (1,2,3);
88
select a$1, $b, c$ from mysqltest.$test1;
89
a$1	$b	c$
90
1	2	3
91
create table mysqltest.test2$ (a int);
92
drop table mysqltest.test2$;
93
drop database mysqltest;
94
create table `` (a int);
95
ERROR 42000: Incorrect table name ''
96
drop table if exists ``;
97
ERROR 42000: Incorrect table name ''
98
create table t1 (`` int);
99
ERROR 42000: Incorrect column name ''
100
create table t1 (i int, index `` (i));
101
ERROR 42000: Incorrect index name ''
102
create table t1 (a int auto_increment not null primary key, B CHAR(20));
103
insert into t1 (b) values ("hello"),("my"),("world");
104
create table t2 (key (b)) select * from t1;
105
explain select * from t2 where b="world";
106
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
107
1	SIMPLE	t2	ref	B	B	21	const	1	Using index condition
108
select * from t2 where b="world";
109
a	B
110
3	world
111
drop table t1,t2;
112
create table t1(x varchar(50) );
113
create table t2 select x from t1 where 1=2;
114
describe t1;
115
Field	Type	Null	Key	Default	Extra
116
x	varchar(50)	YES		NULL	
117
describe t2;
118
Field	Type	Null	Key	Default	Extra
119
x	varchar(50)	YES		NULL	
120
drop table t2;
121
create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f;
122
describe t2;
123
Field	Type	Null	Key	Default	Extra
124
a	datetime	NO		0000-00-00 00:00:00	
125
b	time	NO		00:00:00	
126
c	date	NO		0000-00-00	
127
d	int(3)	NO		0	
128
e	decimal(3,1)	NO		0.0	
129
f	bigint(19)	NO		0	
130
drop table t2;
131
create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29  20:45:11" AS DATETIME) as dt;
132
describe t2;
133
Field	Type	Null	Key	Default	Extra
134
d	date	YES		NULL	
135
t	time	YES		NULL	
136
dt	datetime	YES		NULL	
137
drop table t1,t2;
138
create table t1 (a tinyint);
139
create table t2 (a int) select * from t1;
140
describe t1;
141
Field	Type	Null	Key	Default	Extra
142
a	tinyint(4)	YES		NULL	
143
describe t2;
144
Field	Type	Null	Key	Default	Extra
145
a	int(11)	YES		NULL	
146
drop table if exists t2;
147
create table t2 (a int, a float) select * from t1;
148
ERROR 42S21: Duplicate column name 'a'
149
drop table if exists t2;
150
Warnings:
151
Note	1051	Unknown table 't2'
152
create table t2 (a int) select a as b, a+1 as b from t1;
153
ERROR 42S21: Duplicate column name 'b'
154
drop table if exists t2;
155
Warnings:
156
Note	1051	Unknown table 't2'
157
create table t2 (b int) select a as b, a+1 as b from t1;
158
ERROR 42S21: Duplicate column name 'b'
159
drop table if exists t1,t2;
160
Warnings:
161
Note	1051	Unknown table 't2'
162
CREATE TABLE t1 (a int not null);
163
INSERT INTO t1 values (1),(2),(1);
164
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
165
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
166
SELECT * from t2;
167
ERROR 42S02: Table 'test.t2' doesn't exist
168
DROP TABLE t1;
169
DROP TABLE IF EXISTS t2;
170
Warnings:
171
Note	1051	Unknown table 't2'
172
create table t1 (a int not null, b int, primary key(a), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b));
173
show create table t1;
174
Table	Create Table
175
t1	CREATE TABLE `t1` (
176
  `a` int(11) NOT NULL,
177
  `b` int(11) DEFAULT NULL,
178
  PRIMARY KEY (`a`),
179
  KEY `b` (`b`),
180
  KEY `b_2` (`b`),
181
  KEY `b_3` (`b`),
182
  KEY `b_4` (`b`),
183
  KEY `b_5` (`b`),
184
  KEY `b_6` (`b`),
185
  KEY `b_7` (`b`),
186
  KEY `b_8` (`b`),
187
  KEY `b_9` (`b`),
188
  KEY `b_10` (`b`),
189
  KEY `b_11` (`b`),
190
  KEY `b_12` (`b`),
191
  KEY `b_13` (`b`),
192
  KEY `b_14` (`b`),
193
  KEY `b_15` (`b`),
194
  KEY `b_16` (`b`),
195
  KEY `b_17` (`b`),
196
  KEY `b_18` (`b`),
197
  KEY `b_19` (`b`),
198
  KEY `b_20` (`b`),
199
  KEY `b_21` (`b`),
200
  KEY `b_22` (`b`),
201
  KEY `b_23` (`b`),
202
  KEY `b_24` (`b`),
203
  KEY `b_25` (`b`),
204
  KEY `b_26` (`b`),
205
  KEY `b_27` (`b`),
206
  KEY `b_28` (`b`),
207
  KEY `b_29` (`b`),
208
  KEY `b_30` (`b`),
209
  KEY `b_31` (`b`)
210
) ENGINE=MyISAM DEFAULT CHARSET=latin1
211
drop table t1;
212
create table t1 select if(1,'1','0'), month("2002-08-02");
213
drop table t1;
214
create table t1 select if('2002'='2002','Y','N');
215
select * from t1;
216
if('2002'='2002','Y','N')
217
Y
218
drop table if exists t1;
219
SET SESSION storage_engine="heap";
220
SELECT @@storage_engine;
221
@@storage_engine
222
MEMORY
223
CREATE TABLE t1 (a int not null);
224
show create table t1;
225
Table	Create Table
226
t1	CREATE TABLE `t1` (
227
  `a` int(11) NOT NULL
228
) ENGINE=MEMORY DEFAULT CHARSET=latin1
229
drop table t1;
230
SET SESSION storage_engine="gemini";
231
ERROR 42000: Unknown table engine 'gemini'
232
SELECT @@storage_engine;
233
@@storage_engine
234
MEMORY
235
CREATE TABLE t1 (a int not null);
236
show create table t1;
237
Table	Create Table
238
t1	CREATE TABLE `t1` (
239
  `a` int(11) NOT NULL
240
) ENGINE=MEMORY DEFAULT CHARSET=latin1
241
SET SESSION storage_engine=default;
242
drop table t1;
243
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
244
insert into t1 values ("a", 1), ("b", 2);
245
insert into t1 values ("c", NULL);
246
ERROR 23000: Column 'k2' cannot be null
247
insert into t1 values (NULL, 3);
248
ERROR 23000: Column 'k1' cannot be null
249
insert into t1 values (NULL, NULL);
250
ERROR 23000: Column 'k1' cannot be null
251
drop table t1;
252
create table t1 select x'4132';
253
drop table t1;
254
create table t1 select 1,2,3;
255
create table if not exists t1 select 1,2;
256
Warnings:
257
Note	1050	Table 't1' already exists
258
create table if not exists t1 select 1,2,3,4;
259
ERROR 21S01: Column count doesn't match value count at row 1
260
create table if not exists t1 select 1;
261
Warnings:
262
Note	1050	Table 't1' already exists
263
select * from t1;
264
1	2	3
265
1	2	3
266
0	1	2
267
0	0	1
268
drop table t1;
269
flush status;
270
create table t1 (a int not null, b int, primary key (a));
271
insert into t1 values (1,1);
272
create table if not exists t1 select 2;
273
Warnings:
274
Note	1050	Table 't1' already exists
275
Warning	1364	Field 'a' doesn't have a default value
276
select * from t1;
277
a	b
278
1	1
279
0	2
280
create table if not exists t1 select 3 as 'a',4 as 'b';
281
Warnings:
282
Note	1050	Table 't1' already exists
283
create table if not exists t1 select 3 as 'a',3 as 'b';
284
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
285
show warnings;
286
Level	Code	Message
287
Note	1050	Table 't1' already exists
288
Error	1062	Duplicate entry '3' for key 'PRIMARY'
289
show status like "Opened_tables";
290
Variable_name	Value
291
Opened_tables	2
292
select * from t1;
293
a	b
294
1	1
295
0	2
296
3	4
297
drop table t1;
298
create table `t1 `(a int);
299
ERROR 42000: Incorrect table name 't1 '
300
create database `db1 `;
301
ERROR 42000: Incorrect database name 'db1 '
302
create table t1(`a ` int);
303
ERROR 42000: Incorrect column name 'a '
304
create table t1 (a int,);
305
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
306
create table t1 (a int,,b int);
307
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1
308
create table t1 (,b int);
309
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1
310
create table t1 (a int, key(a));
311
create table t2 (b int, foreign key(b) references t1(a), key(b));
312
drop table if exists t1,t2;
313
create table t1(id int not null, name char(20));
314
insert into t1 values(10,'mysql'),(20,'monty- the creator');
315
create table t2(id int not null);
316
insert into t2 values(10),(20);
317
create table t3 like t1;
318
show create table t3;
319
Table	Create Table
320
t3	CREATE TABLE `t3` (
321
  `id` int(11) NOT NULL,
322
  `name` char(20) DEFAULT NULL
323
) ENGINE=MyISAM DEFAULT CHARSET=latin1
324
select * from t3;
325
id	name
326
create table if not exists t3 like t1;
327
Warnings:
328
Note	1050	Table 't3' already exists
329
select @@warning_count;
330
@@warning_count
331
1
332
create temporary table t3 like t2;
333
show create table t3;
334
Table	Create Table
335
t3	CREATE TEMPORARY TABLE `t3` (
336
  `id` int(11) NOT NULL
337
) ENGINE=MyISAM DEFAULT CHARSET=latin1
338
select * from t3;
339
id
340
drop table t3;
341
show create table t3;
342
Table	Create Table
343
t3	CREATE TABLE `t3` (
344
  `id` int(11) NOT NULL,
345
  `name` char(20) DEFAULT NULL
346
) ENGINE=MyISAM DEFAULT CHARSET=latin1
347
select * from t3;
348
id	name
349
drop table t2, t3;
350
create database mysqltest;
351
create table mysqltest.t3 like t1;
352
create temporary table t3 like mysqltest.t3;
353
show create table t3;
354
Table	Create Table
355
t3	CREATE TEMPORARY TABLE `t3` (
356
  `id` int(11) NOT NULL,
357
  `name` char(20) DEFAULT NULL
358
) ENGINE=MyISAM DEFAULT CHARSET=latin1
359
create table t2 like t3;
360
show create table t2;
361
Table	Create Table
362
t2	CREATE TABLE `t2` (
363
  `id` int(11) NOT NULL,
364
  `name` char(20) DEFAULT NULL
365
) ENGINE=MyISAM DEFAULT CHARSET=latin1
366
select * from t2;
367
id	name
368
create table t3 like t1;
369
create table t3 like mysqltest.t3;
370
ERROR 42S01: Table 't3' already exists
371
create table non_existing_database.t1 like t1;
372
ERROR 42000: Unknown database 'non_existing_database'
373
create table t3 like non_existing_table;
374
ERROR 42S02: Table 'test.non_existing_table' doesn't exist
375
create temporary table t3 like t1;
376
ERROR 42S01: Table 't3' already exists
377
drop table t1, t2, t3;
378
drop table t3;
379
drop database mysqltest;
380
SET SESSION storage_engine="heap";
381
SELECT @@storage_engine;
382
@@storage_engine
383
MEMORY
384
CREATE TABLE t1 (a int not null);
385
show create table t1;
386
Table	Create Table
387
t1	CREATE TABLE `t1` (
388
  `a` int(11) NOT NULL
389
) ENGINE=MEMORY DEFAULT CHARSET=latin1
390
drop table t1;
391
SET SESSION storage_engine="gemini";
392
ERROR 42000: Unknown table engine 'gemini'
393
SELECT @@storage_engine;
394
@@storage_engine
395
MEMORY
396
CREATE TABLE t1 (a int not null);
397
show create table t1;
398
Table	Create Table
399
t1	CREATE TABLE `t1` (
400
  `a` int(11) NOT NULL
401
) ENGINE=MEMORY DEFAULT CHARSET=latin1
402
SET SESSION storage_engine=default;
403
drop table t1;
404
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
405
insert into t1(a)values(1);
406
insert into t1(a,b,c,d,e,f,g,h)
407
values(2,-2,2,'1825-12-14','a','2003-1-1 3:2:1','4:3:2','binary data');
408
select * from t1;
409
a	b	c	d	e	f	g	h
410
1	NULL	NULL	NULL	NULL	NULL	NULL	NULL
411
2	-2	2	1825-12-14	a	2003-01-01 03:02:01	04:03:02	binary data
412
select a, 
413
ifnull(b,cast(-7 as signed)) as b, 
414
ifnull(c,cast(7 as unsigned)) as c, 
415
ifnull(d,cast('2000-01-01' as date)) as d, 
416
ifnull(e,cast('b' as char)) as e,
417
ifnull(f,cast('2000-01-01' as datetime)) as f, 
418
ifnull(g,cast('5:4:3' as time)) as g,
419
ifnull(h,cast('yet another binary data' as binary)) as h,
420
addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd 
421
from t1;
422
a	b	c	d	e	f	g	h	dd
423
1	-7	7	2000-01-01	b	2000-01-01 00:00:00	05:04:03	yet another binary data	02:00:00
424
2	-2	2	1825-12-14	a	2003-01-01 03:02:01	04:03:02	binary data	02:00:00
425
create table t2
426
select
427
a, 
428
ifnull(b,cast(-7                        as signed))   as b,
429
ifnull(c,cast(7                         as unsigned)) as c,
430
ifnull(d,cast('2000-01-01'              as date))     as d,
431
ifnull(e,cast('b'                       as char))     as e,
432
ifnull(f,cast('2000-01-01'              as datetime)) as f,
433
ifnull(g,cast('5:4:3'                   as time))     as g,
434
ifnull(h,cast('yet another binary data' as binary))   as h,
435
addtime(cast('1:0:0' as time),cast('1:0:0' as time))  as dd
436
from t1;
437
explain t2;
438
Field	Type	Null	Key	Default	Extra
439
a	int(11)	YES		NULL	
440
b	bigint(11)	NO		0	
441
c	bigint(11) unsigned	NO		0	
442
d	date	YES		NULL	
443
e	varchar(1)	NO			
444
f	datetime	YES		NULL	
445
g	time	YES		NULL	
446
h	longblob	NO		NULL	
447
dd	time	YES		NULL	
448
select * from t2;
449
a	b	c	d	e	f	g	h	dd
450
1	-7	7	2000-01-01	b	2000-01-01 00:00:00	05:04:03	yet another binary data	02:00:00
451
2	-2	2	1825-12-14	a	2003-01-01 03:02:01	04:03:02	binary data	02:00:00
452
drop table t1, t2;
453
create table t1 (a tinyint, b smallint, c mediumint, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), i year, j date, k timestamp, l datetime, m enum('a','b'), n set('a','b'), o char(10));
454
create table t2 select ifnull(a,a), ifnull(b,b), ifnull(c,c), ifnull(d,d), ifnull(e,e), ifnull(f,f), ifnull(g,g), ifnull(h,h), ifnull(i,i), ifnull(j,j), ifnull(k,k), ifnull(l,l), ifnull(m,m), ifnull(n,n), ifnull(o,o) from t1;
455
show create table t2;
456
Table	Create Table
457
t2	CREATE TABLE `t2` (
458
  `ifnull(a,a)` tinyint(4) DEFAULT NULL,
459
  `ifnull(b,b)` smallint(6) DEFAULT NULL,
460
  `ifnull(c,c)` mediumint(8) DEFAULT NULL,
461
  `ifnull(d,d)` int(11) DEFAULT NULL,
462
  `ifnull(e,e)` bigint(20) DEFAULT NULL,
463
  `ifnull(f,f)` float(3,2) DEFAULT NULL,
464
  `ifnull(g,g)` double(4,3) DEFAULT NULL,
465
  `ifnull(h,h)` decimal(5,4) DEFAULT NULL,
466
  `ifnull(i,i)` year(4) DEFAULT NULL,
467
  `ifnull(j,j)` date DEFAULT NULL,
468
  `ifnull(k,k)` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
469
  `ifnull(l,l)` datetime DEFAULT NULL,
470
  `ifnull(m,m)` varchar(1) DEFAULT NULL,
471
  `ifnull(n,n)` varchar(3) DEFAULT NULL,
472
  `ifnull(o,o)` varchar(10) DEFAULT NULL
473
) ENGINE=MyISAM DEFAULT CHARSET=latin1
474
drop table t1,t2;
475
create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14');
476
insert into t1 values ('','',0,0.0);
477
describe t1;
478
Field	Type	Null	Key	Default	Extra
479
str	varchar(10)	YES		def	
480
strnull	varchar(10)	YES		NULL	
481
intg	int(11)	YES		10	
482
rel	double	YES		3.14	
483
create table t2 select default(str) as str, default(strnull) as strnull, default(intg) as intg, default(rel) as rel from t1;
484
describe t2;
485
Field	Type	Null	Key	Default	Extra
486
str	varchar(10)	YES		NULL	
487
strnull	varchar(10)	YES		NULL	
488
intg	int(11)	YES		NULL	
489
rel	double	YES		NULL	
490
drop table t1, t2;
491
create table t1(name varchar(10), age smallint default -1);
492
describe t1;
493
Field	Type	Null	Key	Default	Extra
494
name	varchar(10)	YES		NULL	
495
age	smallint(6)	YES		-1	
496
create table t2(name varchar(10), age smallint default - 1);
497
describe t2;
498
Field	Type	Null	Key	Default	Extra
499
name	varchar(10)	YES		NULL	
500
age	smallint(6)	YES		-1	
501
drop table t1, t2;
502
create table t1(cenum enum('a'), cset set('b'));
503
create table t2(cenum enum('a','a'), cset set('b','b'));
504
Warnings:
505
Note	1291	Column 'cenum' has duplicated value 'a' in ENUM
506
Note	1291	Column 'cset' has duplicated value 'b' in SET
507
create table t3(cenum enum('a','A','a','c','c'), cset set('b','B','b','d','d'));
508
Warnings:
509
Note	1291	Column 'cenum' has duplicated value 'a' in ENUM
510
Note	1291	Column 'cenum' has duplicated value 'A' in ENUM
511
Note	1291	Column 'cenum' has duplicated value 'c' in ENUM
512
Note	1291	Column 'cset' has duplicated value 'b' in SET
513
Note	1291	Column 'cset' has duplicated value 'B' in SET
514
Note	1291	Column 'cset' has duplicated value 'd' in SET
515
drop table t1, t2, t3;
516
create database mysqltest;
517
use mysqltest;
518
select database();
519
database()
520
mysqltest
521
drop database mysqltest;
522
select database();
523
database()
524
NULL
525
create user mysqltest_1;
526
select database(), user();
527
database()	user()
528
NULL	mysqltest_1@localhost
529
drop user mysqltest_1;
530
use test;
531
create table t1 (a int, index `primary` (a));
532
ERROR 42000: Incorrect index name 'primary'
533
create table t1 (a int, index `PRIMARY` (a));
534
ERROR 42000: Incorrect index name 'PRIMARY'
535
create table t1 (`primary` int, index(`primary`));
536
show create table t1;
537
Table	Create Table
538
t1	CREATE TABLE `t1` (
539
  `primary` int(11) DEFAULT NULL,
540
  KEY `primary_2` (`primary`)
541
) ENGINE=MyISAM DEFAULT CHARSET=latin1
542
create table t2 (`PRIMARY` int, index(`PRIMARY`));
543
show create table t2;
544
Table	Create Table
545
t2	CREATE TABLE `t2` (
546
  `PRIMARY` int(11) DEFAULT NULL,
547
  KEY `PRIMARY_2` (`PRIMARY`)
548
) ENGINE=MyISAM DEFAULT CHARSET=latin1
549
create table t3 (a int);
550
alter table t3 add index `primary` (a);
551
ERROR 42000: Incorrect index name 'primary'
552
alter table t3 add index `PRIMARY` (a);
553
ERROR 42000: Incorrect index name 'PRIMARY'
554
create table t4 (`primary` int);
555
alter table t4 add index(`primary`);
556
show create table t4;
557
Table	Create Table
558
t4	CREATE TABLE `t4` (
559
  `primary` int(11) DEFAULT NULL,
560
  KEY `primary_2` (`primary`)
561
) ENGINE=MyISAM DEFAULT CHARSET=latin1
562
create table t5 (`PRIMARY` int);
563
alter table t5 add index(`PRIMARY`);
564
show create table t5;
565
Table	Create Table
566
t5	CREATE TABLE `t5` (
567
  `PRIMARY` int(11) DEFAULT NULL,
568
  KEY `PRIMARY_2` (`PRIMARY`)
569
) ENGINE=MyISAM DEFAULT CHARSET=latin1
570
drop table t1, t2, t3, t4, t5;
571
CREATE TABLE t1(id varchar(10) NOT NULL PRIMARY KEY, dsc longtext);
572
INSERT INTO t1 VALUES ('5000000001', NULL),('5000000003', 'Test'),('5000000004', NULL);
573
CREATE TABLE t2(id varchar(15) NOT NULL, proc varchar(100) NOT NULL, runID varchar(16) NOT NULL, start datetime NOT NULL, PRIMARY KEY  (id,proc,runID,start));
574
INSERT INTO t2 VALUES ('5000000001', 'proc01', '20031029090650', '2003-10-29 13:38:40'),('5000000001', 'proc02', '20031029090650', '2003-10-29 13:38:51'),('5000000001', 'proc03', '20031029090650', '2003-10-29 13:38:11'),('5000000002', 'proc09', '20031024013310', '2003-10-24 01:33:11'),('5000000002', 'proc09', '20031024153537', '2003-10-24 15:36:04'),('5000000004', 'proc01', '20031024013641', '2003-10-24 01:37:29'),('5000000004', 'proc02', '20031024013641', '2003-10-24 01:37:39');
575
CREATE TABLE t3  SELECT t1.dsc,COUNT(DISTINCT t2.id) AS countOfRuns  FROM t1 LEFT JOIN t2 ON (t1.id=t2.id) GROUP BY t1.id;
576
SELECT * FROM t3;
577
dsc	countOfRuns
578
NULL	1
579
Test	0
580
NULL	1
581
drop table t1, t2, t3;
582
create table t1 (b bool not null default false);
583
create table t2 (b bool not null default true);
584
insert into t1 values ();
585
insert into t2 values ();
586
select * from t1;
587
b
588
0
589
select * from t2;
590
b
591
1
592
drop table t1,t2;
593
create table t1 (a int);
594
create table t1 select * from t1;
595
ERROR HY000: You can't specify target table 't1' for update in FROM clause
596
create table t2 union = (t1) select * from t1;
597
ERROR HY000: 'test.t2' is not BASE TABLE
598
flush tables with read lock;
599
unlock tables;
600
drop table t1;
601
create table t1(column.name int);
602
ERROR 42000: Incorrect table name 'column'
603
create table t1(test.column.name int);
604
ERROR 42000: Incorrect table name 'column'
605
create table t1(xyz.t1.name int);
606
ERROR 42000: Incorrect database name 'xyz'
607
create table t1(t1.name int);
608
create table t2(test.t2.name int);
609
drop table t1,t2;
610
CREATE TABLE t1 (f1 VARCHAR(255) CHARACTER SET utf8);
611
CREATE TABLE t2 AS SELECT LEFT(f1,171) AS f2 FROM t1 UNION SELECT LEFT(f1,171) AS f2 FROM t1;
612
DESC t2;
613
Field	Type	Null	Key	Default	Extra
614
f2	varchar(171)	YES		NULL	
615
DROP TABLE t1,t2;
616
CREATE TABLE t12913 (f1 ENUM ('a','b')) AS SELECT 'a' AS f1;
617
SELECT * FROM t12913;
618
f1
619
a
620
DROP TABLE t12913;
621
create database mysqltest;
622
use mysqltest;
623
drop database mysqltest;
624
create table test.t1 like x;
625
ERROR 3D000: No database selected
626
drop table if exists test.t1;
627
create database mysqltest;
628
use mysqltest;
629
create view v1 as select 'foo' from dual;
630
create table t1 like v1;
631
ERROR HY000: 'mysqltest.v1' is not BASE TABLE
632
drop view v1;
633
drop database mysqltest;
634
create database mysqltest;
635
create database if not exists mysqltest character set latin2;
636
Warnings:
637
Note	1007	Can't create database 'mysqltest'; database exists
638
show create database mysqltest;
639
Database	Create Database
640
mysqltest	CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
641
drop database mysqltest;
642
use test;
643
create table t1 (a int);
644
create table if not exists t1 (a int);
645
Warnings:
646
Note	1050	Table 't1' already exists
647
drop table t1;
648
create table t1 (
649
a varchar(112) charset utf8 collate utf8_bin not null,
650
primary key (a)
651
) select 'test' as a ;
652
show create table t1;
653
Table	Create Table
654
t1	CREATE TABLE `t1` (
655
  `a` varchar(112) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
656
  PRIMARY KEY (`a`)
657
) ENGINE=MyISAM DEFAULT CHARSET=latin1
658
drop table t1;
659
CREATE TABLE t2 (
660
a int(11) default NULL
661
);
662
insert into t2 values(111);
663
create table t1 ( 
664
a varchar(12) charset utf8 collate utf8_bin not null, 
665
b int not null, primary key (a)
666
) select a, 1 as b from t2 ;
667
show create table t1;
668
Table	Create Table
669
t1	CREATE TABLE `t1` (
670
  `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
671
  `b` int(11) NOT NULL,
672
  PRIMARY KEY (`a`)
673
) ENGINE=MyISAM DEFAULT CHARSET=latin1
674
drop table t1;
675
create table t1 ( 
676
a varchar(12) charset utf8 collate utf8_bin not null, 
677
b int not null, primary key (a)
678
) select a, 1 as c from t2 ;
679
Warnings:
680
Warning	1364	Field 'b' doesn't have a default value
681
show create table t1;
682
Table	Create Table
683
t1	CREATE TABLE `t1` (
684
  `b` int(11) NOT NULL,
685
  `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
686
  `c` int(1) NOT NULL DEFAULT '0',
687
  PRIMARY KEY (`a`)
688
) ENGINE=MyISAM DEFAULT CHARSET=latin1
689
drop table t1;
690
create table t1 ( 
691
a varchar(12) charset utf8 collate utf8_bin not null, 
692
b int null, primary key (a)
693
) select a, 1 as c from t2 ;
694
show create table t1;
695
Table	Create Table
696
t1	CREATE TABLE `t1` (
697
  `b` int(11) DEFAULT NULL,
698
  `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
699
  `c` int(1) NOT NULL DEFAULT '0',
700
  PRIMARY KEY (`a`)
701
) ENGINE=MyISAM DEFAULT CHARSET=latin1
702
drop table t1;
703
create table t1 ( 
704
a varchar(12) charset utf8 collate utf8_bin not null,
705
b int not null, primary key (a)
706
) select 'a' as a , 1 as b from t2 ;
707
show create table t1;
708
Table	Create Table
709
t1	CREATE TABLE `t1` (
710
  `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
711
  `b` int(11) NOT NULL,
712
  PRIMARY KEY (`a`)
713
) ENGINE=MyISAM DEFAULT CHARSET=latin1
714
drop table t1;
715
create table t1 ( 
716
a varchar(12) charset utf8 collate utf8_bin,
717
b int not null, primary key (a)
718
) select 'a' as a , 1 as b from t2 ;
719
show create table t1;
720
Table	Create Table
721
t1	CREATE TABLE `t1` (
722
  `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
723
  `b` int(11) NOT NULL,
724
  PRIMARY KEY (`a`)
725
) ENGINE=MyISAM DEFAULT CHARSET=latin1
726
drop table t1, t2;
727
create table t1 ( 
728
a1 int not null,
729
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
730
);
731
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
732
create table t2 ( 
733
a1 varchar(12) charset utf8 collate utf8_bin not null,
734
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
735
primary key (a1)
736
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
737
drop table t2;
738
create table t2 ( 
739
a1 varchar(12) charset utf8 collate utf8_bin,
740
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
741
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
742
drop table t1, t2;
743
create table t1 ( 
744
a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
745
);
746
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
747
create table t2 ( 
748
a1 varchar(12) charset utf8 collate utf8_bin not null,
749
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
750
primary key (a1)
751
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
752
drop table t2;
753
create table t2 ( a int default 3, b int default 3)
754
select a1,a2 from t1;
755
show create table t2;
756
Table	Create Table
757
t2	CREATE TABLE `t2` (
758
  `a` int(11) DEFAULT '3',
759
  `b` int(11) DEFAULT '3',
760
  `a1` int(11) DEFAULT NULL,
761
  `a2` int(11) DEFAULT NULL
762
) ENGINE=MyISAM DEFAULT CHARSET=latin1
763
drop table t1, t2;
764
create table t1(a set("a,b","c,d") not null);
765
ERROR 22007: Illegal set 'a,b' value found during parsing
766
create table t1 (i int) engine=myisam max_rows=100000000000;
767
show create table t1;
768
Table	Create Table
769
t1	CREATE TABLE `t1` (
770
  `i` int(11) DEFAULT NULL
771
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
772
alter table t1 max_rows=100;
773
show create table t1;
774
Table	Create Table
775
t1	CREATE TABLE `t1` (
776
  `i` int(11) DEFAULT NULL
777
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=100
778
alter table t1 max_rows=100000000000;
779
show create table t1;
780
Table	Create Table
781
t1	CREATE TABLE `t1` (
782
  `i` int(11) DEFAULT NULL
783
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
784
drop table t1;
785
create table t1 select * from t2;
786
ERROR 42S02: Table 'test.t2' doesn't exist
787
create table t1 select * from t1;
788
ERROR HY000: You can't specify target table 't1' for update in FROM clause
789
create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin);
790
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce'
791
create table t1 (primary key(a)) select "b" as b;
792
ERROR 42000: Key column 'a' doesn't exist in table
793
create table t1 (a int);
794
create table if not exists t1 select 1 as a, 2 as b;
795
ERROR 21S01: Column count doesn't match value count at row 1
796
drop table t1;
797
create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a);
798
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
799
create table t1 (i int);
800
create table t1 select 1 as i;
801
ERROR 42S01: Table 't1' already exists
802
create table if not exists t1 select 1 as i;
803
Warnings:
804
Note	1050	Table 't1' already exists
805
select * from t1;
806
i
807
1
808
create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin);
809
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce'
810
select * from t1;
811
i
812
1
813
alter table t1 add primary key (i);
814
create table if not exists t1 (select 2 as i) union all (select 2 as i);
815
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
816
select * from t1;
817
i
818
1
819
2
820
drop table t1;
821
create temporary table t1 (j int);
822
create table if not exists t1 select 1;
823
Warnings:
824
Note	1050	Table 't1' already exists
825
select * from t1;
826
j
827
1
828
drop temporary table t1;
829
select * from t1;
830
ERROR 42S02: Table 'test.t1' doesn't exist
831
drop table t1;
832
ERROR 42S02: Unknown table 't1'
833
create table t1 (i int);
834
insert into t1 values (1), (2);
835
lock tables t1 read;
836
create table t2 select * from t1;
837
ERROR HY000: Table 't2' was not locked with LOCK TABLES
838
create table if not exists t2 select * from t1;
839
ERROR HY000: Table 't2' was not locked with LOCK TABLES
840
unlock tables;
841
create table t2 (j int);
842
lock tables t1 read;
843
create table t2 select * from t1;
844
ERROR HY000: Table 't2' was not locked with LOCK TABLES
845
create table if not exists t2 select * from t1;
846
ERROR HY000: Table 't2' was not locked with LOCK TABLES
847
unlock tables;
848
lock table t1 read, t2 read;
849
create table t2 select * from t1;
850
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
851
create table if not exists t2 select * from t1;
852
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
853
unlock tables;
854
lock table t1 read, t2 write;
855
create table t2 select * from t1;
856
ERROR 42S01: Table 't2' already exists
857
create table if not exists t2 select * from t1;
858
Warnings:
859
Note	1050	Table 't2' already exists
860
select * from t1;
861
i
862
1
863
2
864
unlock tables;
865
drop table t2;
866
lock tables t1 read;
867
create temporary table t2 select * from t1;
868
create temporary table if not exists t2 select * from t1;
869
Warnings:
870
Note	1050	Table 't2' already exists
871
select * from t2;
872
i
873
1
874
2
875
1
876
2
877
unlock tables;
878
drop table t1, t2;
879
create table t1 (upgrade int);
880
drop table t1;
881
create table t1 (
882
c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int,
883
c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int,
884
key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (
885
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
886
key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (
887
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
888
key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (
889
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
890
key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (
891
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
892
key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (
893
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
894
key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (
895
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
896
key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (
897
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
898
key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (
899
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
900
key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (
901
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
902
key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (
903
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
904
key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (
905
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
906
key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (
907
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
908
key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (
909
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
910
key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (
911
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
912
key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (
913
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
914
key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (
915
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
916
key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (
917
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
918
key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (
919
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
920
key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (
921
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
922
key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (
923
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
924
key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (
925
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
926
key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (
927
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
928
key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (
929
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
930
key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (
931
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
932
key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (
933
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
934
key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (
935
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
936
key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (
937
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
938
key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (
939
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
940
key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (
941
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
942
key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (
943
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
944
key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (
945
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
946
key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (
947
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
948
key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (
949
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
950
key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (
951
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
952
key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (
953
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
954
key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (
955
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
956
key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (
957
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
958
key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (
959
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
960
key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (
961
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
962
key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (
963
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
964
key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (
965
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
966
key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (
967
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
968
key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (
969
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
970
key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (
971
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
972
key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (
973
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
974
key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (
975
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
976
key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (
977
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
978
key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (
979
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
980
key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (
981
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
982
key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (
983
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
984
key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (
985
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
986
key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (
987
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
988
key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (
989
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
990
key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (
991
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
992
key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (
993
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
994
key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (
995
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
996
key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (
997
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
998
key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (
999
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1000
key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (
1001
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1002
key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (
1003
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1004
key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (
1005
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1006
key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (
1007
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1008
key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (
1009
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1010
key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (
1011
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16)
1012
);
1013
show create table t1;
1014
Table	Create Table
1015
t1	CREATE TABLE `t1` (
1016
  `c1` int(11) DEFAULT NULL,
1017
  `c2` int(11) DEFAULT NULL,
1018
  `c3` int(11) DEFAULT NULL,
1019
  `c4` int(11) DEFAULT NULL,
1020
  `c5` int(11) DEFAULT NULL,
1021
  `c6` int(11) DEFAULT NULL,
1022
  `c7` int(11) DEFAULT NULL,
1023
  `c8` int(11) DEFAULT NULL,
1024
  `c9` int(11) DEFAULT NULL,
1025
  `c10` int(11) DEFAULT NULL,
1026
  `c11` int(11) DEFAULT NULL,
1027
  `c12` int(11) DEFAULT NULL,
1028
  `c13` int(11) DEFAULT NULL,
1029
  `c14` int(11) DEFAULT NULL,
1030
  `c15` int(11) DEFAULT NULL,
1031
  `c16` int(11) DEFAULT NULL,
1032
  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`),
1033
  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`),
1034
  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`),
1035
  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`),
1036
  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`),
1037
  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`),
1038
  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`),
1039
  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`),
1040
  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`),
1041
  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`),
1042
  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`),
1043
  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`),
1044
  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`),
1045
  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`),
1046
  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`),
1047
  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`),
1048
  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`),
1049
  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`),
1050
  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`),
1051
  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`),
1052
  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`),
1053
  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`),
1054
  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`),
1055
  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`),
1056
  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`),
1057
  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`),
1058
  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`),
1059
  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`),
1060
  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`),
1061
  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`),
1062
  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`),
1063
  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`),
1064
  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`),
1065
  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`),
1066
  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`),
1067
  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`),
1068
  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`),
1069
  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`),
1070
  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`),
1071
  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`),
1072
  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`),
1073
  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`),
1074
  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`),
1075
  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`),
1076
  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`),
1077
  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`),
1078
  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`),
1079
  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`),
1080
  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`),
1081
  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`),
1082
  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`),
1083
  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`),
1084
  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`),
1085
  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`),
1086
  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`),
1087
  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`),
1088
  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`),
1089
  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`),
1090
  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`),
1091
  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`),
1092
  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`),
1093
  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`),
1094
  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`),
1095
  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`)
1096
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1097
flush tables;
1098
show create table t1;
1099
Table	Create Table
1100
t1	CREATE TABLE `t1` (
1101
  `c1` int(11) DEFAULT NULL,
1102
  `c2` int(11) DEFAULT NULL,
1103
  `c3` int(11) DEFAULT NULL,
1104
  `c4` int(11) DEFAULT NULL,
1105
  `c5` int(11) DEFAULT NULL,
1106
  `c6` int(11) DEFAULT NULL,
1107
  `c7` int(11) DEFAULT NULL,
1108
  `c8` int(11) DEFAULT NULL,
1109
  `c9` int(11) DEFAULT NULL,
1110
  `c10` int(11) DEFAULT NULL,
1111
  `c11` int(11) DEFAULT NULL,
1112
  `c12` int(11) DEFAULT NULL,
1113
  `c13` int(11) DEFAULT NULL,
1114
  `c14` int(11) DEFAULT NULL,
1115
  `c15` int(11) DEFAULT NULL,
1116
  `c16` int(11) DEFAULT NULL,
1117
  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`),
1118
  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`),
1119
  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`),
1120
  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`),
1121
  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`),
1122
  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`),
1123
  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`),
1124
  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`),
1125
  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`),
1126
  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`),
1127
  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`),
1128
  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`),
1129
  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`),
1130
  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`),
1131
  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`),
1132
  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`),
1133
  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`),
1134
  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`),
1135
  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`),
1136
  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`),
1137
  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`),
1138
  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`),
1139
  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`),
1140
  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`),
1141
  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`),
1142
  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`),
1143
  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`),
1144
  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`),
1145
  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`),
1146
  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`),
1147
  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`),
1148
  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`),
1149
  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`),
1150
  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`),
1151
  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`),
1152
  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`),
1153
  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`),
1154
  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`),
1155
  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`),
1156
  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`),
1157
  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`),
1158
  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`),
1159
  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`),
1160
  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`),
1161
  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`),
1162
  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`),
1163
  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`),
1164
  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`),
1165
  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`),
1166
  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`),
1167
  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`),
1168
  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`),
1169
  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`),
1170
  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`),
1171
  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`),
1172
  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`),
1173
  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`),
1174
  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`),
1175
  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`),
1176
  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`),
1177
  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`),
1178
  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`),
1179
  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`),
1180
  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`)
1181
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1182
drop table t1;
1183
create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, 
1184
c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int);
1185
alter table t1
1186
add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (
1187
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1188
add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (
1189
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1190
add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (
1191
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1192
add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (
1193
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1194
add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (
1195
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1196
add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (
1197
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1198
add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (
1199
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1200
add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (
1201
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1202
add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (
1203
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1204
add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (
1205
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1206
add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (
1207
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1208
add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (
1209
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1210
add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (
1211
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1212
add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (
1213
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1214
add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (
1215
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1216
add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (
1217
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1218
add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (
1219
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1220
add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (
1221
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1222
add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (
1223
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1224
add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (
1225
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1226
add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (
1227
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1228
add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (
1229
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1230
add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (
1231
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1232
add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (
1233
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1234
add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (
1235
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1236
add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (
1237
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1238
add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (
1239
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1240
add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (
1241
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1242
add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (
1243
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1244
add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (
1245
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1246
add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (
1247
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1248
add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (
1249
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1250
add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (
1251
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1252
add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (
1253
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1254
add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (
1255
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1256
add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (
1257
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1258
add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (
1259
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1260
add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (
1261
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1262
add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (
1263
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1264
add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (
1265
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1266
add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (
1267
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1268
add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (
1269
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1270
add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (
1271
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1272
add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (
1273
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1274
add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (
1275
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1276
add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (
1277
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1278
add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (
1279
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1280
add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (
1281
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1282
add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (
1283
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1284
add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (
1285
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1286
add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (
1287
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1288
add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (
1289
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1290
add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (
1291
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1292
add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (
1293
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1294
add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (
1295
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1296
add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (
1297
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1298
add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (
1299
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1300
add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (
1301
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1302
add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (
1303
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1304
add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (
1305
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1306
add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (
1307
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1308
add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (
1309
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1310
add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (
1311
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16),
1312
add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (
1313
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);
1314
show create table t1;
1315
Table	Create Table
1316
t1	CREATE TABLE `t1` (
1317
  `c1` int(11) DEFAULT NULL,
1318
  `c2` int(11) DEFAULT NULL,
1319
  `c3` int(11) DEFAULT NULL,
1320
  `c4` int(11) DEFAULT NULL,
1321
  `c5` int(11) DEFAULT NULL,
1322
  `c6` int(11) DEFAULT NULL,
1323
  `c7` int(11) DEFAULT NULL,
1324
  `c8` int(11) DEFAULT NULL,
1325
  `c9` int(11) DEFAULT NULL,
1326
  `c10` int(11) DEFAULT NULL,
1327
  `c11` int(11) DEFAULT NULL,
1328
  `c12` int(11) DEFAULT NULL,
1329
  `c13` int(11) DEFAULT NULL,
1330
  `c14` int(11) DEFAULT NULL,
1331
  `c15` int(11) DEFAULT NULL,
1332
  `c16` int(11) DEFAULT NULL,
1333
  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`),
1334
  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`),
1335
  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`),
1336
  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`),
1337
  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`),
1338
  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`),
1339
  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`),
1340
  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`),
1341
  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`),
1342
  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`),
1343
  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`),
1344
  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`),
1345
  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`),
1346
  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`),
1347
  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`),
1348
  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`),
1349
  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`),
1350
  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`),
1351
  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`),
1352
  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`),
1353
  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`),
1354
  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`),
1355
  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`),
1356
  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`),
1357
  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`),
1358
  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`),
1359
  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`),
1360
  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`),
1361
  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`),
1362
  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`),
1363
  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`),
1364
  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`),
1365
  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`),
1366
  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`),
1367
  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`),
1368
  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`),
1369
  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`),
1370
  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`),
1371
  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`),
1372
  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`),
1373
  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`),
1374
  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`),
1375
  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`),
1376
  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`),
1377
  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`),
1378
  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`),
1379
  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`),
1380
  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`),
1381
  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`),
1382
  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`),
1383
  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`),
1384
  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`),
1385
  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`),
1386
  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`),
1387
  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`),
1388
  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`),
1389
  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`),
1390
  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`),
1391
  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`),
1392
  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`),
1393
  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`),
1394
  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`),
1395
  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`),
1396
  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`)
1397
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1398
flush tables;
1399
show create table t1;
1400
Table	Create Table
1401
t1	CREATE TABLE `t1` (
1402
  `c1` int(11) DEFAULT NULL,
1403
  `c2` int(11) DEFAULT NULL,
1404
  `c3` int(11) DEFAULT NULL,
1405
  `c4` int(11) DEFAULT NULL,
1406
  `c5` int(11) DEFAULT NULL,
1407
  `c6` int(11) DEFAULT NULL,
1408
  `c7` int(11) DEFAULT NULL,
1409
  `c8` int(11) DEFAULT NULL,
1410
  `c9` int(11) DEFAULT NULL,
1411
  `c10` int(11) DEFAULT NULL,
1412
  `c11` int(11) DEFAULT NULL,
1413
  `c12` int(11) DEFAULT NULL,
1414
  `c13` int(11) DEFAULT NULL,
1415
  `c14` int(11) DEFAULT NULL,
1416
  `c15` int(11) DEFAULT NULL,
1417
  `c16` int(11) DEFAULT NULL,
1418
  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`),
1419
  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`),
1420
  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`),
1421
  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`),
1422
  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`),
1423
  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`),
1424
  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`),
1425
  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`),
1426
  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`),
1427
  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`),
1428
  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`),
1429
  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`),
1430
  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`),
1431
  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`),
1432
  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`),
1433
  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`),
1434
  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`),
1435
  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`),
1436
  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`),
1437
  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`),
1438
  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`),
1439
  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`),
1440
  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`),
1441
  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`),
1442
  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`),
1443
  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`),
1444
  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`),
1445
  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`),
1446
  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`),
1447
  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`),
1448
  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`),
1449
  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`),
1450
  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`),
1451
  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`),
1452
  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`),
1453
  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`),
1454
  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`),
1455
  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`),
1456
  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`),
1457
  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`),
1458
  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`),
1459
  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`),
1460
  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`),
1461
  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`),
1462
  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`),
1463
  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`),
1464
  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`),
1465
  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`),
1466
  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`),
1467
  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`),
1468
  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`),
1469
  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`),
1470
  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`),
1471
  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`),
1472
  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`),
1473
  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`),
1474
  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`),
1475
  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`),
1476
  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`),
1477
  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`),
1478
  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`),
1479
  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`),
1480
  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`),
1481
  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`)
1482
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1483
alter table t1 add key 
1484
a065_long_123456789_123456789_123456789_123456789_123456789_1234 (
1485
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);
1486
ERROR 42000: Too many keys specified; max 64 keys allowed
1487
drop table t1;
1488
create table t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, 
1489
c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, 
1490
c16 int, c17 int);
1491
alter table t1 add key i1 (
1492
c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16, c17);
1493
ERROR 42000: Too many key parts specified; max 16 parts allowed
1494
alter table t1 add key 
1495
a001_long_123456789_123456789_123456789_123456789_123456789_12345 (c1);
1496
ERROR 42000: Identifier name 'a001_long_123456789_123456789_123456789_123456789_123456789_12345' is too long
1497
show create table t1;
1498
Table	Create Table
1499
t1	CREATE TABLE `t1` (
1500
  `c1` int(11) DEFAULT NULL,
1501
  `c2` int(11) DEFAULT NULL,
1502
  `c3` int(11) DEFAULT NULL,
1503
  `c4` int(11) DEFAULT NULL,
1504
  `c5` int(11) DEFAULT NULL,
1505
  `c6` int(11) DEFAULT NULL,
1506
  `c7` int(11) DEFAULT NULL,
1507
  `c8` int(11) DEFAULT NULL,
1508
  `c9` int(11) DEFAULT NULL,
1509
  `c10` int(11) DEFAULT NULL,
1510
  `c11` int(11) DEFAULT NULL,
1511
  `c12` int(11) DEFAULT NULL,
1512
  `c13` int(11) DEFAULT NULL,
1513
  `c14` int(11) DEFAULT NULL,
1514
  `c15` int(11) DEFAULT NULL,
1515
  `c16` int(11) DEFAULT NULL,
1516
  `c17` int(11) DEFAULT NULL
1517
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1518
drop table t1;
1519
1520
Bug #26104 Bug on foreign key class constructor
1521
1522
Check that ref_columns is initalized correctly in the constructor
1523
and semantic checks in mysql_prepare_table work.
1524
1525
We do not need a storage engine that supports foreign keys
1526
for this test, as the checks are purely syntax-based, and the
1527
syntax is supported for all engines.
1528
1529
drop table if exists t1,t2;
1530
create table t1(a int not null, b int not null, primary key (a, b));
1531
create table t2(a int not null, b int not null, c int not null, primary key (a),
1532
foreign key fk_bug26104 (b,c) references t1(a));
1533
ERROR 42000: Incorrect foreign key definition for 'fk_bug26104': Key reference and table reference don't match
1534
drop table t1;
1535
create table t1(f1 int,f2 int);
1536
insert into t1 value(1,1),(1,2),(1,3),(2,1),(2,2),(2,3);
1537
flush status;
1538
create table t2 select sql_big_result f1,count(f2) from t1 group by f1;
1539
show status like 'handler_read%';
1540
Variable_name	Value
1541
Handler_read_first	0
1542
Handler_read_key	0
1543
Handler_read_next	0
1544
Handler_read_prev	0
1545
Handler_read_rnd	0
1546
Handler_read_rnd_next	7
1547
drop table t1,t2;
1548
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
1549
DROP TABLE t1;
1550
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
1551
DROP TABLE t1;
1552
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
1553
SHOW INDEX FROM t1;
1554
Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_Comment
1555
t1	1	c1	1	c1	NULL	0	NULL	NULL	YES	HASH		
1556
DROP TABLE t1;
1557
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
1558
SHOW INDEX FROM t1;
1559
Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_Comment
1560
t1	1	c1	1	c1	A	NULL	NULL	NULL	YES	BTREE		
1561
DROP TABLE t1;
1562
End of 5.0 tests
1563
CREATE TABLE t1 (a int, b int);
1564
insert into t1 values (1,1),(1,2);
1565
CREATE TABLE t2 (primary key (a)) select * from t1;
1566
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1567
drop table if exists t2;
1568
Warnings:
1569
Note	1051	Unknown table 't2'
1570
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
1571
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1572
drop table if exists t2;
1573
Warnings:
1574
Note	1051	Unknown table 't2'
1575
CREATE TABLE t2 (a int, b int, primary key (a));
1576
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
1577
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1578
SELECT * from t2;
1579
a	b
1580
1	1
1581
TRUNCATE table t2;
1582
INSERT INTO t2 select * from t1;
1583
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1584
SELECT * from t2;
1585
a	b
1586
1	1
1587
drop table t2;
1588
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
1589
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
1590
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1591
SELECT * from t2;
1592
a	b
1593
1	1
1594
TRUNCATE table t2;
1595
INSERT INTO t2 select * from t1;
1596
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1597
SELECT * from t2;
1598
a	b
1599
1	1
1600
drop table t1,t2;
1601
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1602
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1603
DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1604
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1605
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1606
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1607
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1608
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1609
set names utf8;
1610
create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
1611
use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
1612
select database();
1613
database()
1614
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
1615
use test;
1616
select SCHEMA_NAME from information_schema.schemata
1617
where schema_name='имя_базы_в_кодировке_утф8_длиной_больше_чем_45';
1618
SCHEMA_NAME
1619
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
1620
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
1621
create table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48
1622
(
1623
имя_поля_в_кодировке_утф8_длиной_больше_чем_45 int,
1624
index имя_индекса_в_кодировке_утф8_длиной_больше_чем_48 (имя_поля_в_кодировке_утф8_длиной_больше_чем_45)
1625
);
1626
create view имя_вью_кодировке_утф8_длиной_больше_чем_42 as
1627
select имя_поля_в_кодировке_утф8_длиной_больше_чем_45
1628
from имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1629
select * from имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1630
имя_поля_в_кодировке_утф8_длиной_больше_чем_45
1631
select TABLE_NAME from information_schema.tables where
1632
table_schema='test';
1633
TABLE_NAME
1634
имя_вью_кодировке_утф8_длиной_больше_чем_42
1635
имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48
1636
select COLUMN_NAME from information_schema.columns where
1637
table_schema='test';
1638
COLUMN_NAME
1639
имя_поля_в_кодировке_утф8_длиной_больше_чем_45
1640
имя_поля_в_кодировке_утф8_длиной_больше_чем_45
1641
select INDEX_NAME from information_schema.statistics where
1642
table_schema='test';
1643
INDEX_NAME
1644
имя_индекса_в_кодировке_утф8_длиной_больше_чем_48
1645
select TABLE_NAME from information_schema.views where
1646
table_schema='test';
1647
TABLE_NAME
1648
имя_вью_кодировке_утф8_длиной_больше_чем_42
1649
show create table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1650
Table	Create Table
1651
имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48	CREATE TABLE `имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48` (
1652
  `имя_поля_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL,
1653
  KEY `имя_индекса_в_кодировке_утф8_длиной_больше_чем_48` (`имя_поля_в_кодировке_утф8_длиной_больше_чем_45`)
1654
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1655
show create view имя_вью_кодировке_утф8_длиной_больше_чем_42;
1656
View	Create View	character_set_client	collation_connection
1657
имя_вью_кодировке_утф8_длиной_больше_чем_42	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имя_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имя_поля_в_кодировке_утф8_длиной_больше_чем_45` AS `имя_поля_в_кодировке_утф8_длиной_больше_чем_45` from `имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48`	utf8	utf8_general_ci
1658
create trigger имя_триггера_в_кодировке_утф8_длиной_больше_чем_49
1659
before insert on имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
1660
select TRIGGER_NAME from information_schema.triggers where
1661
trigger_schema='test';
1662
TRIGGER_NAME
1663
имя_триггера_в_кодировке_утф8_длиной_больше_чем_49
1664
drop trigger имя_триггера_в_кодировке_утф8_длиной_больше_чем_49;
1665
create trigger
1666
очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66
1667
before insert on имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
1668
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
1669
drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66;
1670
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
1671
create procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
1672
begin
1673
end;
1674
select ROUTINE_NAME from information_schema.routines where
1675
routine_schema='test';
1676
ROUTINE_NAME
1677
имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50
1678
drop procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
1679
create procedure очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
1680
begin
1681
end;
1682
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
1683
create function имя_функции_в_кодировке_утф8_длиной_больше_чем_49()
1684
returns int
1685
return 0;
1686
select ROUTINE_NAME from information_schema.routines where
1687
routine_schema='test';
1688
ROUTINE_NAME
1689
имя_функции_в_кодировке_утф8_длиной_больше_чем_49
1690
drop function имя_функции_в_кодировке_утф8_длиной_больше_чем_49;
1691
create function очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
1692
returns int
1693
return 0;
1694
ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
1695
drop view имя_вью_кодировке_утф8_длиной_больше_чем_42;
1696
drop table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1697
set names default;
1698
drop table if exists t1,t2,t3;
1699
drop function if exists f1;
1700
create function f1() returns int
1701
begin
1702
declare res int;
1703
create temporary table t3 select 1 i;
1704
set res:= (select count(*) from t1);
1705
drop temporary table t3;
1706
return res;
1707
end|
1708
create table t1 as select 1;
1709
create table t2 as select f1() from t1;
1710
drop table t1,t2;
1711
drop function f1;
1712
create table t1 like information_schema.processlist;
1713
show create table t1;
1714
Table	Create Table
1715
t1	CREATE TABLE `t1` (
1716
  `ID` bigint(4) NOT NULL DEFAULT '0',
1717
  `USER` varchar(16) NOT NULL DEFAULT '',
1718
  `HOST` varchar(64) NOT NULL DEFAULT '',
1719
  `DB` varchar(64) DEFAULT NULL,
1720
  `COMMAND` varchar(16) NOT NULL DEFAULT '',
1721
  `TIME` bigint(7) NOT NULL DEFAULT '0',
1722
  `STATE` varchar(64) DEFAULT NULL,
1723
  `INFO` longtext
1724
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1725
drop table t1;
1726
create temporary table t1 like information_schema.processlist;
1727
show create table t1;
1728
Table	Create Table
1729
t1	CREATE TEMPORARY TABLE `t1` (
1730
  `ID` bigint(4) NOT NULL DEFAULT '0',
1731
  `USER` varchar(16) NOT NULL DEFAULT '',
1732
  `HOST` varchar(64) NOT NULL DEFAULT '',
1733
  `DB` varchar(64) DEFAULT NULL,
1734
  `COMMAND` varchar(16) NOT NULL DEFAULT '',
1735
  `TIME` bigint(7) NOT NULL DEFAULT '0',
1736
  `STATE` varchar(64) DEFAULT NULL,
1737
  `INFO` longtext
1738
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1739
drop table t1;
1740
create table t1 like information_schema.character_sets;
1741
show create table t1;
1742
Table	Create Table
1743
t1	CREATE TABLE `t1` (
1744
  `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
1745
  `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
1746
  `DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
1747
  `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
1748
) ENGINE=MEMORY DEFAULT CHARSET=utf8
1749
drop table t1;
1750
1751
# --
1752
# -- Bug#21380: DEFAULT definition not always transfered by CREATE
1753
# -- TABLE/SELECT to the new table.
1754
# --
1755
1756
DROP TABLE IF EXISTS t1;
1757
DROP TABLE IF EXISTS t2;
1758
1759
CREATE TABLE t1(
1760
c1 INT DEFAULT 12 COMMENT 'column1',
1761
c2 INT NULL COMMENT 'column2',
1762
c3 INT NOT NULL COMMENT 'column3',
1763
c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
1764
c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
1765
c6 VARCHAR(255))
1766
COLLATE latin1_bin;
1767
1768
SHOW CREATE TABLE t1;
1769
Table	Create Table
1770
t1	CREATE TABLE `t1` (
1771
  `c1` int(11) DEFAULT '12' COMMENT 'column1',
1772
  `c2` int(11) DEFAULT NULL COMMENT 'column2',
1773
  `c3` int(11) NOT NULL COMMENT 'column3',
1774
  `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
1775
  `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
1776
  `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
1777
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
1778
1779
CREATE TABLE t2 AS SELECT * FROM t1;
1780
1781
SHOW CREATE TABLE t2;
1782
Table	Create Table
1783
t2	CREATE TABLE `t2` (
1784
  `c1` int(11) DEFAULT '12' COMMENT 'column1',
1785
  `c2` int(11) DEFAULT NULL COMMENT 'column2',
1786
  `c3` int(11) NOT NULL COMMENT 'column3',
1787
  `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
1788
  `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
1789
  `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
1790
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1791
1792
DROP TABLE t2;
1793
1794
# -- End of test case for Bug#21380.
1795
1796
# --
1797
# -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
1798
# --
1799
1800
DROP TABLE IF EXISTS t1;
1801
DROP TABLE IF EXISTS t2;
1802
DROP TABLE IF EXISTS t3;
1803
1804
CREATE TABLE t1(c1 TIMESTAMP, c2 TIMESTAMP);
1805
1806
SET sql_mode = NO_ZERO_DATE;
1807
1808
CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP DEFAULT 0);
1809
ERROR 42000: Invalid default value for 'c2'
1810
1811
CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP);
1812
ERROR 42000: Invalid default value for 'c2'
1813
1814
# -- Check that NULL column still can be created.
1815
CREATE TABLE t2(c1 TIMESTAMP NULL);
1816
1817
# -- Check ALTER TABLE.
1818
ALTER TABLE t1 ADD INDEX(c1);
1819
ERROR 42000: Invalid default value for 'c2'
1820
1821
# -- Check DATETIME.
1822
SET sql_mode = '';
1823
1824
CREATE TABLE t3(c1 DATETIME NOT NULL);
1825
INSERT INTO t3 VALUES (0);
1826
1827
SET sql_mode = TRADITIONAL;
1828
1829
ALTER TABLE t3 ADD INDEX(c1);
1830
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'c1' at row 1
1831
1832
# -- Cleanup.
1833
SET sql_mode = '';
1834
DROP TABLE t1;
1835
DROP TABLE t2;
1836
DROP TABLE t3;
1837
1838
# -- End of Bug#18834.
1839
1840
# --
1841
# -- Bug#34274: Invalid handling of 'DEFAULT 0' for YEAR data type.
1842
# --
1843
1844
DROP TABLE IF EXISTS t1;
1845
1846
CREATE TABLE t1(c1 YEAR DEFAULT 2008, c2 YEAR DEFAULT 0);
1847
1848
SHOW CREATE TABLE t1;
1849
Table	Create Table
1850
t1	CREATE TABLE `t1` (
1851
  `c1` year(4) DEFAULT '2008',
1852
  `c2` year(4) DEFAULT '0000'
1853
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1854
1855
INSERT INTO t1 VALUES();
1856
1857
SELECT * FROM t1;
1858
c1	c2
1859
2008	0000
1860
1861
ALTER TABLE t1 MODIFY c1 YEAR DEFAULT 0;
1862
1863
SHOW CREATE TABLE t1;
1864
Table	Create Table
1865
t1	CREATE TABLE `t1` (
1866
  `c1` year(4) DEFAULT '0000',
1867
  `c2` year(4) DEFAULT '0000'
1868
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1869
1870
INSERT INTO t1 VALUES();
1871
1872
SELECT * FROM t1;
1873
c1	c2
1874
2008	0000
1875
0000	0000
1876
1877
DROP TABLE t1;
1878
1879
# -- End of Bug#34274
1880
1881
End of 5.1 tests