~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Monty Taylor
  • Date: 2009-04-25 20:45:19 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 1003.
  • Revision ID: mordred@inaugust.com-20090425204519-lgrl7mz2r66v0jby
Blackhole.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2;
2
2
SET SQL_WARNINGS=1;
3
 
CREATE TEMPORARY TABLE t1 (
 
3
CREATE TABLE t1 (
4
4
STRING_DATA char(255) default NULL,
5
5
KEY string_data (STRING_DATA)
6
6
) ENGINE=MyISAM;
18
18
check table t1;
19
19
Table   Op      Msg_type        Msg_text
20
20
test.t1 check   status  OK
 
21
repair table t1;
 
22
Table   Op      Msg_type        Msg_text
 
23
test.t1 repair  note    The storage engine for the table doesn't support repair
21
24
delete from t1 where (a mod 2) = 1;
22
25
check table t1;
23
26
Table   Op      Msg_type        Msg_text
24
27
test.t1 check   status  OK
 
28
repair table t1;
 
29
Table   Op      Msg_type        Msg_text
 
30
test.t1 repair  note    The storage engine for the table doesn't support repair
 
31
check table t1;
 
32
Table   Op      Msg_type        Msg_text
 
33
test.t1 check   status  OK
25
34
drop table t1;
26
 
create TEMPORARY table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) ENGINE=MYISAM;
 
35
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
27
36
insert into t1 (b) values (1),(2),(2),(2),(2);
28
 
alter table t1 engine=MYISAM;
29
 
show index from t1;
30
 
Table   Unique  Key_name        Seq_in_index    Column_name
31
 
t1      TRUE    PRIMARY 1       a
32
 
t1      FALSE   b       1       b
33
 
alter table t1 engine=MyISAM;
34
 
show index from t1;
35
 
Table   Unique  Key_name        Seq_in_index    Column_name
36
 
t1      TRUE    PRIMARY 1       a
37
 
t1      FALSE   b       1       b
 
37
optimize table t1;
 
38
Table   Op      Msg_type        Msg_text
 
39
test.t1 optimize        status  OK
 
40
show index from t1;
 
41
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
42
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
 
43
t1      1       b       1       b       A       5       NULL    NULL            BTREE           
 
44
optimize table t1;
 
45
Table   Op      Msg_type        Msg_text
 
46
test.t1 optimize        status  OK
 
47
show index from t1;
 
48
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
49
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
 
50
t1      1       b       1       b       A       5       NULL    NULL            BTREE           
38
51
drop table t1;
39
 
create temporary table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
 
52
create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
40
53
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
41
54
explain select * from t1 order by a;
42
55
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
63
76
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
64
77
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       
65
78
drop table t1;
66
 
create temporary table t1 ( t1 char(255), key(t1(250))) ENGINE=MYISAM;
 
79
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
 
80
INSERT INTO  t1 VALUES (1), (2), (3);
 
81
LOCK TABLES t1 WRITE;
 
82
INSERT INTO  t1 VALUES (1), (2), (3);
 
83
OPTIMIZE TABLE t1;
 
84
Table   Op      Msg_type        Msg_text
 
85
test.t1 optimize        status  OK
 
86
DROP TABLE t1;
 
87
create table t1 ( t1 char(255), key(t1(250)));
 
88
Warnings:
 
89
Warning 1071    Specified key was too long; max key length is 767 bytes
67
90
insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169');
68
91
insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203');
69
92
insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767');
93
116
insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'),
94
117
('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'),
95
118
('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47');
96
 
alter table t1 ENGINE=myisam;
 
119
optimize table t1;
 
120
Table   Op      Msg_type        Msg_text
 
121
test.t1 optimize        status  OK
97
122
check table t1;
98
123
Table   Op      Msg_type        Msg_text
99
124
test.t1 check   status  OK
100
125
drop table t1;
101
 
create temporary table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
 
126
create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
102
127
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
103
128
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
104
129
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
274
299
Table   Op      Msg_type        Msg_text
275
300
test.t1 check   status  OK
276
301
drop table t1;
277
 
CREATE TEMPORARY TABLE `t1` (
 
302
CREATE TABLE `t1` (
278
303
`post_id` int NOT NULL auto_increment,
279
304
`topic_id` int NOT NULL default '0',
280
305
`post_time` datetime,
296
321
Table   Op      Msg_type        Msg_text
297
322
test.t1 check   status  OK
298
323
drop table t1;
299
 
CREATE TEMPORARY TABLE t1 (a varchar(300), b varchar(300), c varchar(300), d varchar(300), e varchar(300), KEY t1 (a, b, c, d, e)) ENGINE=MyISAM;
 
324
CREATE TABLE t1 (a varchar(300), b varchar(300), c varchar(300), d varchar(300), e varchar(300), KEY t1 (a, b, c, d, e)) ENGINE=MyISAM;
300
325
ERROR 42000: Specified key was too long; max key length is 1332 bytes
301
 
CREATE TEMPORARY TABLE t1 (a varchar(300), b varchar(300), c varchar(300), d varchar(300), e varchar(300)) ENGINE=MyISAM;
 
326
CREATE TABLE t1 (a varchar(300), b varchar(300), c varchar(300), d varchar(300), e varchar(300)) ENGINE=MyISAM;
302
327
ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
303
328
ERROR 42000: Specified key was too long; max key length is 1332 bytes
304
329
DROP TABLE t1;
305
 
CREATE TEMPORARY TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) ENGINE=MyISAM;
 
330
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) ENGINE=MyISAM;
306
331
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
307
332
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
308
333
INSERT into t2 values (1,1,1), (2,2,2);
309
 
alter table t1 ENGINE=MYISAM;
 
334
optimize table t1;
 
335
Table   Op      Msg_type        Msg_text
 
336
test.t1 optimize        status  OK
310
337
show index from t1;
311
 
Table   Unique  Key_name        Seq_in_index    Column_name
312
 
t1      FALSE   b       1       b
313
 
t1      FALSE   c       1       c
314
 
t1      FALSE   a       1       a
315
 
t1      FALSE   a       2       b
316
 
t1      FALSE   c_2     1       c
317
 
t1      FALSE   c_2     2       a
 
338
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
339
t1      1       b       1       b       A       5       NULL    NULL    YES     BTREE           
 
340
t1      1       c       1       c       A       5       NULL    NULL    YES     BTREE           
 
341
t1      1       a       1       a       A       1       NULL    NULL            BTREE           
 
342
t1      1       a       2       b       A       5       NULL    NULL    YES     BTREE           
 
343
t1      1       c_2     1       c       A       5       NULL    NULL    YES     BTREE           
 
344
t1      1       c_2     2       a       A       5       NULL    NULL            BTREE           
318
345
explain select * from t1,t2 where t1.a=t2.a;
319
346
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
320
347
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
321
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
348
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
322
349
explain select * from t1,t2 force index(a) where t1.a=t2.a;
323
350
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
324
351
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
325
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
352
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
326
353
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
327
354
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
328
355
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
329
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
356
1       SIMPLE  t1      ref     a       a       4       test.t2.a       3       
330
357
explain select * from t1,t2 where t1.b=t2.b;
331
358
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
332
359
1       SIMPLE  t2      ALL     b       NULL    NULL    NULL    2       
333
 
1       SIMPLE  t1      ALL     b       NULL    NULL    NULL    5       Using where; Using join buffer
 
360
1       SIMPLE  t1      ref     b       b       5       test.t2.b       1       
334
361
explain select * from t1,t2 force index(c) where t1.a=t2.a;
335
362
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
336
363
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    2       
337
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
364
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
338
365
explain select * from t1 where a=0 or a=2;
339
366
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
340
367
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where
341
368
explain select * from t1 force index (a) where a=0 or a=2;
342
369
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
343
 
1       SIMPLE  t1      range   a       a       4       NULL    4       Using where
 
370
1       SIMPLE  t1      range   a       a       4       NULL    4       Using where; Using MRR
344
371
explain select * from t1 where c=1;
345
372
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
346
373
1       SIMPLE  t1      ref     c,c_2   c       5       const   1       
370
397
Table   Op      Msg_type        Msg_text
371
398
test.t1 check   status  OK
372
399
drop table t1;
373
 
create temporary table t1 ( a text not null, key a (a(20))) engine=myisam;
 
400
create table t1 ( a text not null, key a (a(20)));
374
401
insert into t1 values ('aaa   '),('aaa'),('aa');
375
402
check table t1;
376
403
Table   Op      Msg_type        Msg_text
377
404
test.t1 check   status  OK
 
405
repair table t1;
 
406
Table   Op      Msg_type        Msg_text
 
407
test.t1 repair  note    The storage engine for the table doesn't support repair
378
408
select concat(a,'.') from t1 where a='aaa';
379
409
concat(a,'.')
380
410
aaa   .
389
419
bbb.
390
420
aa.
391
421
drop table t1;
392
 
create temporary table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))) engine=myisam;
 
422
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
393
423
insert into t1 values('807780', '477', '165');
394
424
insert into t1 values('807780', '477', '162');
395
425
insert into t1 values('807780', '472', '162');
400
430
DROP TABLE IF EXISTS t1;
401
431
Warnings:
402
432
Note    1051    Unknown table 't1'
403
 
CREATE TEMPORARY TABLE t1 (a varchar(150) NOT NULL, KEY (a)) ENGINE=MyISAM;
 
433
CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)) ENGINE=MyISAM;
404
434
INSERT t1 VALUES ("can \tcan");
405
435
INSERT t1 VALUES ("can   can");
406
436
INSERT t1 VALUES ("can");
474
504
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1       Using temporary; Using filesort
475
505
1       SIMPLE  t2      index   NULL    PRIMARY 4       NULL    2       Using index; Distinct; Using join buffer
476
506
drop table t1,t2;
477
 
create temporary table t1 (
 
507
create table t1 (
478
508
c1 varchar(32),
479
509
key (c1)
480
510
) engine=myisam;
484
514
c1
485
515
a
486
516
drop table t1;
487
 
create table t1 (a int, b varchar(200), c text not null);
488
 
create table t2 (a int, b varchar(200), c text not null);
 
517
create table t1 (a int, b varchar(200), c text not null) checksum=1;
 
518
create table t2 (a int, b varchar(200), c text not null) checksum=0;
489
519
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
490
520
insert t2 select * from t1;
491
 
checksum table t1, t2, t3;
492
 
Table   Checksum
493
 
test.t1 3505595080
494
 
test.t2 3505595080
495
 
test.t3 NULL
496
 
Warnings:
497
 
Error   1146    Table 'test.t3' doesn't exist
498
 
checksum table t1, t2, t3;
499
 
Table   Checksum
500
 
test.t1 3505595080
501
 
test.t2 3505595080
502
 
test.t3 NULL
503
 
Warnings:
504
 
Error   1146    Table 'test.t3' doesn't exist
505
 
checksum table t1, t2, t3;
506
 
Table   Checksum
507
 
test.t1 3505595080
508
 
test.t2 3505595080
509
 
test.t3 NULL
510
 
Warnings:
511
 
Error   1146    Table 'test.t3' doesn't exist
512
 
show table status;
513
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
514
 
#       test    t1      STANDARD        InnoDB  #       #       #       #       #
515
 
#       test    t2      STANDARD        InnoDB  #       #       #       #       #
 
521
checksum table t1, t2, t3 quick;
 
522
Table   Checksum
 
523
test.t1 NULL
 
524
test.t2 NULL
 
525
test.t3 NULL
 
526
Warnings:
 
527
Error   1146    Table 'test.t3' doesn't exist
 
528
checksum table t1, t2, t3;
 
529
Table   Checksum
 
530
test.t1 2948697075
 
531
test.t2 2948697075
 
532
test.t3 NULL
 
533
Warnings:
 
534
Error   1146    Table 'test.t3' doesn't exist
 
535
checksum table t1, t2, t3 extended;
 
536
Table   Checksum
 
537
test.t1 2948697075
 
538
test.t2 2948697075
 
539
test.t3 NULL
 
540
Warnings:
 
541
Error   1146    Table 'test.t3' doesn't exist
516
542
drop table t1,t2;
517
543
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
518
544
insert into t1 values (null,''), (null,'');
561
587
cip     score   bob
562
588
1       0       NULL
563
589
drop table t1;
564
 
create temporary table t1 (
 
590
create table t1 (
565
591
id1 int not null auto_increment,
566
592
id2 int not null default '0',
567
593
t text not null,
579
605
count(id1)
580
606
5
581
607
drop table t1;
582
 
CREATE TEMPORARY TABLE t1(a int, KEY(a)) ENGINE=MyISAM;
 
608
CREATE TABLE t1(a int, KEY(a)) ENGINE=MyISAM;
583
609
INSERT INTO t1 VALUES(1);
584
610
SELECT MAX(a) FROM t1 IGNORE INDEX(a);
585
611
MAX(a)
592
618
MAX(a)
593
619
1
594
620
DROP TABLE t1;
 
621
CREATE TABLE t1(a CHAR(9), b VARCHAR(7)) ENGINE=MyISAM;
 
622
INSERT INTO t1(a) VALUES('xxxxxxxxx'),('xxxxxxxxx');
 
623
UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb';
 
624
SELECT * FROM t1;
 
625
a       b
 
626
xxxxxxxxx       bbbbbb
 
627
xxxxxxxxx       bbbbbb
 
628
DROP TABLE t1;
595
629
SET GLOBAL myisam_repair_threads=2;
596
630
SHOW VARIABLES LIKE 'myisam_repair%';
597
631
Variable_name   Value
598
632
myisam_repair_threads   2
599
 
CREATE TEMPORARY TABLE t1 (
600
 
`_id` int NOT NULL default '0',
601
 
`url` text,
602
 
`email` text,
603
 
`description` text,
604
 
`loverlap` int default NULL,
605
 
`roverlap` int default NULL,
606
 
`lneighbor_id` int default NULL,
607
 
`rneighbor_id` int default NULL,
608
 
`length_` int default NULL,
609
 
`sequence` text,
610
 
`name` text,
611
 
`_obj_class` text NOT NULL,
612
 
PRIMARY KEY  (`_id`),
613
 
UNIQUE KEY `sequence_name_index` (`name`(50)),
614
 
KEY (`length_`)
615
 
) ENGINE=MyISAM;
616
 
INSERT INTO t1 VALUES
617
 
(1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''),
618
 
(2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''),
619
 
(3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''),
620
 
(4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''),
621
 
(5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''),
622
 
(6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''),
623
 
(7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''),
624
 
(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''),
625
 
(9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9','');
626
 
SELECT _id FROM t1;
627
 
_id
628
 
1
629
 
2
630
 
3
631
 
4
632
 
5
633
 
6
634
 
7
635
 
8
636
 
9
637
 
DELETE FROM t1 WHERE _id < 8;
638
 
show table status LIKE 't1';
639
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
640
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
641
 
CHECK TABLE t1;
642
 
Table   Op      Msg_type        Msg_text
643
 
test.t1 check   status  OK
644
 
ALTER TABLE t1 ENGINE=MYISAM;
645
 
CHECK TABLE t1;
646
 
Table   Op      Msg_type        Msg_text
647
 
test.t1 check   status  OK
648
 
show table status LIKE 't1';
649
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
650
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
633
CREATE TABLE t1 (
 
634
`_id` int NOT NULL default '0',
 
635
`url` text,
 
636
`email` text,
 
637
`description` text,
 
638
`loverlap` int default NULL,
 
639
`roverlap` int default NULL,
 
640
`lneighbor_id` int default NULL,
 
641
`rneighbor_id` int default NULL,
 
642
`length_` int default NULL,
 
643
`sequence` text,
 
644
`name` text,
 
645
`_obj_class` text NOT NULL,
 
646
PRIMARY KEY  (`_id`),
 
647
UNIQUE KEY `sequence_name_index` (`name`(50)),
 
648
KEY (`length_`)
 
649
) ENGINE=MyISAM;
 
650
INSERT INTO t1 VALUES
 
651
(1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''),
 
652
(2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''),
 
653
(3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''),
 
654
(4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''),
 
655
(5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''),
 
656
(6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''),
 
657
(7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''),
 
658
(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''),
 
659
(9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9','');
 
660
SELECT _id FROM t1;
 
661
_id
 
662
1
 
663
2
 
664
3
 
665
4
 
666
5
 
667
6
 
668
7
 
669
8
 
670
9
 
671
DELETE FROM t1 WHERE _id < 8;
 
672
SHOW TABLE STATUS LIKE 't1';
 
673
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
674
t1      MyISAM  0       Dynamic 2       #       #       #       #       168     #       #       #       #       #       #               
 
675
CHECK TABLE t1 EXTENDED;
 
676
Table   Op      Msg_type        Msg_text
 
677
test.t1 check   status  OK
 
678
OPTIMIZE TABLE t1;
 
679
Table   Op      Msg_type        Msg_text
 
680
test.t1 optimize        status  OK
 
681
CHECK TABLE t1 EXTENDED;
 
682
Table   Op      Msg_type        Msg_text
 
683
test.t1 check   status  OK
 
684
SHOW TABLE STATUS LIKE 't1';
 
685
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
686
t1      MyISAM  0       Dynamic 2       #       #       #       #       0       #       #       #       #       #       #               
 
687
SELECT _id FROM t1;
 
688
_id
 
689
8
 
690
9
 
691
DROP TABLE t1;
 
692
CREATE TABLE t1 (
 
693
`_id` int NOT NULL default '0',
 
694
`url` text,
 
695
`email` text,
 
696
`description` text,
 
697
`loverlap` int default NULL,
 
698
`roverlap` int default NULL,
 
699
`lneighbor_id` int default NULL,
 
700
`rneighbor_id` int default NULL,
 
701
`length_` int default NULL,
 
702
`sequence` text,
 
703
`name` text,
 
704
`_obj_class` text NOT NULL,
 
705
PRIMARY KEY  (`_id`),
 
706
UNIQUE KEY `sequence_name_index` (`name`(50)),
 
707
KEY (`length_`)
 
708
) ENGINE=MyISAM;
 
709
INSERT INTO t1 VALUES
 
710
(1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample1',''),
 
711
(2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample2',''),
 
712
(3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample3',''),
 
713
(4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample4',''),
 
714
(5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample5',''),
 
715
(6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample6',''),
 
716
(7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample7',''),
 
717
(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample8',''),
 
718
(9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sample9','');
 
719
SELECT _id FROM t1;
 
720
_id
 
721
1
 
722
2
 
723
3
 
724
4
 
725
5
 
726
6
 
727
7
 
728
8
 
729
9
 
730
DELETE FROM t1 WHERE _id < 8;
 
731
SHOW TABLE STATUS LIKE 't1';
 
732
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
733
t1      MyISAM  0       Dynamic 2       #       #       #       #       168     #       #       #       #       #       #               
 
734
CHECK TABLE t1 EXTENDED;
 
735
Table   Op      Msg_type        Msg_text
 
736
test.t1 check   status  OK
 
737
REPAIR TABLE t1 QUICK;
 
738
Table   Op      Msg_type        Msg_text
 
739
test.t1 repair  status  OK
 
740
CHECK TABLE t1 EXTENDED;
 
741
Table   Op      Msg_type        Msg_text
 
742
test.t1 check   status  OK
 
743
SHOW TABLE STATUS LIKE 't1';
 
744
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
745
t1      MyISAM  0       Dynamic 2       #       #       #       #       168     #       #       #       #       #       #               
651
746
SELECT _id FROM t1;
652
747
_id
653
748
8
657
752
SHOW VARIABLES LIKE 'myisam_repair%';
658
753
Variable_name   Value
659
754
myisam_repair_threads   1
660
 
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM;
661
 
show table status like 't1';
662
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
663
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
664
 
DROP TABLE t1;
665
 
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
 
755
CREATE TABLE t1(a VARCHAR(16)) ENGINE=MyISAM;
 
756
INSERT INTO t1 VALUES('aaaaaaaa'),(NULL);
 
757
UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa';
 
758
SELECT * FROM t1;
 
759
a
 
760
aaaaaaaaaaaaaaaa
 
761
aaaaaaaaaaaaaaaa
 
762
DROP TABLE t1;
 
763
CREATE TABLE t1(a INT) ENGINE=MyISAM;
 
764
INSERT INTO t1 VALUES(1),(2);
 
765
UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1;
 
766
SELECT * FROM t1 ORDER BY a;
 
767
a
 
768
2
 
769
3
 
770
DROP TABLE t1;
 
771
CREATE TABLE t1 (c1 TEXT) ENGINE=MyISAM AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100;
 
772
SHOW TABLE STATUS LIKE 't1';
 
773
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
774
t1      MyISAM  0       Dynamic X       X       X       72057594037927935       X       X       X       X       X       X       utf8_general_ci X       max_rows=4100100100 avg_row_length=70100        
 
775
DROP TABLE t1;
 
776
CREATE TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
666
777
INSERT INTO t1 VALUES
667
778
(CHAR(9,65)), (CHAR(9,65)), (CHAR(9,65)), (CHAR(9,65)),
668
779
(CHAR(9,65)), (CHAR(9,65)), (CHAR(9,65)), (CHAR(9,65)),
817
928
drop table if exists t1,t2,t3;
818
929
--- Testing varchar ---
819
930
--- Testing varchar ---
820
 
create TEMPORARY table t1 (v varchar(10), c char(10), t text);
 
931
create table t1 (v varchar(10), c char(10), t text);
821
932
insert into t1 values('+ ', '+ ', '+ ');
822
933
set @a=repeat(' ',20);
823
934
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
830
941
*+         *+         *+                    *
831
942
show create table t1;
832
943
Table   Create Table
833
 
t1      CREATE TEMPORARY TABLE `t1` (
 
944
t1      CREATE TABLE `t1` (
834
945
  `v` varchar(10) DEFAULT NULL,
835
946
  `c` varchar(10) DEFAULT NULL,
836
947
  `t` text
837
948
) ENGINE=MyISAM
838
 
create TEMPORARY table t2 like t1;
 
949
create table t2 like t1;
839
950
show create table t2;
840
951
Table   Create Table
841
 
t2      CREATE TEMPORARY TABLE `t2` (
 
952
t2      CREATE TABLE `t2` (
842
953
  `v` varchar(10) DEFAULT NULL,
843
954
  `c` varchar(10) DEFAULT NULL,
844
955
  `t` text
845
956
) ENGINE=MyISAM
846
 
create TEMPORARY table t3 select * from t1;
 
957
create table t3 select * from t1;
847
958
show create table t3;
848
959
Table   Create Table
849
 
t3      CREATE TEMPORARY TABLE `t3` (
 
960
t3      CREATE TABLE `t3` (
850
961
  `v` varchar(10) DEFAULT NULL,
851
962
  `c` varchar(10) DEFAULT NULL,
852
963
  `t` text
854
965
alter table t1 modify c varchar(10);
855
966
show create table t1;
856
967
Table   Create Table
857
 
t1      CREATE TEMPORARY TABLE `t1` (
 
968
t1      CREATE TABLE `t1` (
858
969
  `v` varchar(10) DEFAULT NULL,
859
970
  `c` varchar(10) DEFAULT NULL,
860
971
  `t` text
862
973
alter table t1 modify v char(10);
863
974
show create table t1;
864
975
Table   Create Table
865
 
t1      CREATE TEMPORARY TABLE `t1` (
 
976
t1      CREATE TABLE `t1` (
866
977
  `v` varchar(10) DEFAULT NULL,
867
978
  `c` varchar(10) DEFAULT NULL,
868
979
  `t` text
872
983
Note    1265    Data truncated for column 't' at row 2
873
984
show create table t1;
874
985
Table   Create Table
875
 
t1      CREATE TEMPORARY TABLE `t1` (
 
986
t1      CREATE TABLE `t1` (
876
987
  `v` varchar(10) DEFAULT NULL,
877
988
  `c` varchar(10) DEFAULT NULL,
878
989
  `t` varchar(10) DEFAULT NULL
882
993
*+ *+ *+ *
883
994
*+         *+         *+         *
884
995
drop table t1,t2,t3;
885
 
create TEMPORARY table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
 
996
create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
886
997
show create table t1;
887
998
Table   Create Table
888
 
t1      CREATE TEMPORARY TABLE `t1` (
 
999
t1      CREATE TABLE `t1` (
889
1000
  `v` varchar(10) DEFAULT NULL,
890
1001
  `c` varchar(10) DEFAULT NULL,
891
1002
  `t` text,
892
1003
  KEY `v` (`v`),
893
1004
  KEY `c` (`c`),
894
 
  KEY `t` (`t`(10))
 
1005
  KEY `t` (`t`())
895
1006
) ENGINE=MyISAM
896
1007
select count(*) from t1;
897
1008
count(*)
1104
1215
alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
1105
1216
show create table t1;
1106
1217
Table   Create Table
1107
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1218
t1      CREATE TABLE `t1` (
1108
1219
  `v` varchar(300) DEFAULT NULL,
1109
1220
  `c` varchar(10) DEFAULT NULL,
1110
1221
  `t` text,
1111
1222
  KEY `c` (`c`),
1112
 
  KEY `t` (`t`(10)),
 
1223
  KEY `t` (`t`()),
1113
1224
  KEY `v` (`v`)
1114
1225
) ENGINE=MyISAM
1115
1226
select count(*) from t1 where v='a';
1184
1295
alter table t1 drop key v, add key v (v(30));
1185
1296
show create table t1;
1186
1297
Table   Create Table
1187
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1298
t1      CREATE TABLE `t1` (
1188
1299
  `v` varchar(300) DEFAULT NULL,
1189
1300
  `c` varchar(10) DEFAULT NULL,
1190
1301
  `t` text,
1191
1302
  KEY `c` (`c`),
1192
 
  KEY `t` (`t`(10)),
1193
 
  KEY `v` (`v`(30))
 
1303
  KEY `t` (`t`()),
 
1304
  KEY `v` (`v`())
1194
1305
) ENGINE=MyISAM
1195
1306
select count(*) from t1 where v='a';
1196
1307
count(*)
1264
1375
alter table t1 modify v varchar(600), drop key v, add key v (v);
1265
1376
Warnings:
1266
1377
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1378
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1379
Warning 1071    Specified key was too long; max key length is 1332 bytes
1267
1380
show create table t1;
1268
1381
Table   Create Table
1269
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1382
t1      CREATE TABLE `t1` (
1270
1383
  `v` varchar(600) DEFAULT NULL,
1271
1384
  `c` varchar(10) DEFAULT NULL,
1272
1385
  `t` text,
1273
1386
  KEY `c` (`c`),
1274
 
  KEY `t` (`t`(10)),
1275
 
  KEY `v` (`v`(333))
 
1387
  KEY `t` (`t`()),
 
1388
  KEY `v` (`v`())
1276
1389
) ENGINE=MyISAM
1277
1390
select v,count(*) from t1 group by v limit 10;
1278
1391
v       count(*)
1311
1424
h       10
1312
1425
i       10
1313
1426
drop table t1;
1314
 
create TEMPORARY table t1 (a char(10), unique (a));
 
1427
create table t1 (a char(10), unique (a));
1315
1428
insert into t1 values ('a   ');
1316
1429
insert into t1 values ('a ');
1317
1430
ERROR 23000: Duplicate entry 'a ' for key 'a'
1341
1454
concat(a,'.')
1342
1455
a  .
1343
1456
drop table t1;
1344
 
create TEMPORARY table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5)));
 
1457
create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5)));
1345
1458
show create table t1;
1346
1459
Table   Create Table
1347
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1460
t1      CREATE TABLE `t1` (
1348
1461
  `v` varchar(10) DEFAULT NULL,
1349
1462
  `c` varchar(10) DEFAULT NULL,
1350
1463
  `t` text,
1351
 
  KEY `v` (`v`(5)),
1352
 
  KEY `c` (`c`(5)),
1353
 
  KEY `t` (`t`(5))
 
1464
  KEY `v` (`v`()),
 
1465
  KEY `c` (`c`()),
 
1466
  KEY `t` (`t`())
1354
1467
) ENGINE=MyISAM
1355
1468
drop table t1;
1356
 
create TEMPORARY table t1 (v char(10));
 
1469
create table t1 (v char(10));
1357
1470
show create table t1;
1358
1471
Table   Create Table
1359
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1472
t1      CREATE TABLE `t1` (
1360
1473
  `v` varchar(10) DEFAULT NULL
1361
1474
) ENGINE=MyISAM
1362
1475
drop table t1;
1363
 
create TEMPORARY table t1 (v varchar(10), c char(10));
 
1476
create table t1 (v varchar(10), c char(10)) row_format=fixed;
1364
1477
show create table t1;
1365
1478
Table   Create Table
1366
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1479
t1      CREATE TABLE `t1` (
1367
1480
  `v` varchar(10) DEFAULT NULL,
1368
1481
  `c` varchar(10) DEFAULT NULL
1369
 
) ENGINE=MyISAM
 
1482
) ENGINE=MyISAM ROW_FORMAT=FIXED
1370
1483
insert into t1 values('a','a'),('a ','a ');
1371
1484
select concat('*',v,'*',c,'*') from t1;
1372
1485
concat('*',v,'*',c,'*')
1373
1486
*a*a*
1374
1487
*a *a *
1375
1488
drop table t1;
1376
 
create TEMPORARY table t1(a int, b varchar(12), key ba(b, a));
 
1489
create table t1(a int, b varchar(12), key ba(b, a));
1377
1490
insert into t1 values (1, 'A'), (20, NULL);
1378
1491
explain select * from t1 where a=20 and b is null;
1379
1492
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1382
1495
a       b
1383
1496
20      NULL
1384
1497
drop table t1;
1385
 
create temporary table t1 (v varchar(65530), key(v));
1386
 
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1387
 
create temporary table t1 (v varchar(65536));
1388
 
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1389
 
create temporary table t1 (v varchar(65530));
1390
 
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1391
 
create temporary table t1 (v varchar(65535));
 
1498
create table t1 (v varchar(65530), key(v));
 
1499
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
 
1500
create table t1 (v varchar(65536));
 
1501
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
 
1502
create table t1 (v varchar(65530));
 
1503
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
 
1504
create table t1 (v varchar(65535));
1392
1505
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1393
1506
set storage_engine=InnoDB;
1394
1507
create table t1 (a int, key(a));
1397
1510
Table   Op      Msg_type        Msg_text
1398
1511
test.t1 analyze status  OK
1399
1512
show keys from t1;
1400
 
Table   Unique  Key_name        Seq_in_index    Column_name
1401
 
t1      FALSE   a       1       a
 
1513
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
1514
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
1402
1515
alter table t1 disable keys;
1403
1516
Warnings:
1404
1517
Note    1031    Table storage engine for 't1' doesn't have this option
1406
1519
Warnings:
1407
1520
Note    1031    Table storage engine for 't1' doesn't have this option
1408
1521
show keys from t1;
1409
 
Table   Unique  Key_name        Seq_in_index    Column_name
1410
 
t1      FALSE   a       1       a
 
1522
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
1523
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
1411
1524
drop table t1;
1412
 
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
 
1525
create table t1 (c1 int) engine=myisam pack_keys=0;
 
1526
create table t2 (c1 int) engine=myisam pack_keys=1;
 
1527
create table t3 (c1 int) engine=myisam pack_keys=default;
 
1528
create table t4 (c1 int) engine=myisam pack_keys=2;
 
1529
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '2' at line 1
 
1530
drop table t1, t2, t3;
 
1531
CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1413
1532
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1414
1533
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
1415
1534
a
1435
1554
a
1436
1555
1
1437
1556
DROP TABLE t1;
1438
 
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
1439
 
show table status like 't1';
1440
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1441
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
1557
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
 
1558
SHOW TABLE STATUS LIKE 't1';
 
1559
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1560
t1      MyISAM  0       Fixed   0       #       #       #       1024    #       #       #       #       #       #       #               
1442
1561
INSERT INTO t1 VALUES (1,1);
1443
 
show table status like 't1';
1444
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1445
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1446
 
ALTER TABLE t1 DISABLE KEYS;
1447
 
show table status like 't1';
1448
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1449
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1450
 
ALTER TABLE t1 ENABLE KEYS;
1451
 
show table status like 't1';
1452
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1453
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1454
 
ALTER TABLE t1 DISABLE KEYS;
1455
 
show table status like 't1';
1456
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1457
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1458
 
ALTER TABLE t1 ENABLE KEYS;
1459
 
show table status like 't1';
1460
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1461
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
1562
SHOW TABLE STATUS LIKE 't1';
 
1563
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1564
t1      MyISAM  0       Fixed   1       #       #       #       3072    #       #       #       #       #       #       #               
 
1565
ALTER TABLE t1 DISABLE KEYS;
 
1566
SHOW TABLE STATUS LIKE 't1';
 
1567
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1568
t1      MyISAM  0       Fixed   1       #       #       #       3072    #       #       #       #       #       #       #               
 
1569
ALTER TABLE t1 ENABLE KEYS;
 
1570
SHOW TABLE STATUS LIKE 't1';
 
1571
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1572
t1      MyISAM  0       Fixed   1       #       #       #       3072    #       #       #       #       #       #       #               
 
1573
ALTER TABLE t1 DISABLE KEYS;
 
1574
SHOW TABLE STATUS LIKE 't1';
 
1575
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1576
t1      MyISAM  0       Fixed   1       #       #       #       3072    #       #       #       #       #       #       #               
 
1577
ALTER TABLE t1 ENABLE KEYS;
 
1578
SHOW TABLE STATUS LIKE 't1';
 
1579
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
1580
t1      MyISAM  0       Fixed   1       #       #       #       3072    #       #       #       #       #       #       #               
1462
1581
# Enable keys with parallel repair
1463
1582
SET GLOBAL myisam_repair_threads=2;
1464
1583
ALTER TABLE t1 DISABLE KEYS;
1465
1584
ALTER TABLE t1 ENABLE KEYS;
1466
1585
SET GLOBAL myisam_repair_threads=1;
1467
 
CHECK TABLE t1;
 
1586
CHECK TABLE t1 EXTENDED;
1468
1587
Table   Op      Msg_type        Msg_text
1469
1588
test.t1 check   status  OK
1470
1589
DROP TABLE t1;
1471
 
CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id));
 
1590
CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM;
1472
1591
CREATE TABLE t2 LIKE t1;
1473
1592
INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
1474
1593
INSERT INTO t1 SELECT * FROM t2;
1482
1601
3       2
1483
1602
4       5
1484
1603
4       4
 
1604
DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
 
1605
SELECT * FROM t1;
 
1606
id      ref
 
1607
1       3
 
1608
2       1
 
1609
3       2
 
1610
4       5
1485
1611
DROP TABLE t1, t2;
1486
1612
End of 5.0 tests
1487
 
create temporary table t1 (a int not null, key `a` (a) key_block_size=1024) ENGINE=MyISAM;
 
1613
create table t1 (a int not null, key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1488
1614
show create table t1;
1489
1615
Table   Create Table
1490
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1616
t1      CREATE TABLE `t1` (
1491
1617
  `a` int NOT NULL,
1492
1618
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1493
1619
) ENGINE=MyISAM
1494
1620
drop table t1;
1495
 
create temporary table t1 (a int not null, key `a` (a) key_block_size=2048) ENGINE=MyISAM;
 
1621
create table t1 (a int not null, key `a` (a) key_block_size=2048) ENGINE=MyISAM;
1496
1622
show create table t1;
1497
1623
Table   Create Table
1498
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1624
t1      CREATE TABLE `t1` (
1499
1625
  `a` int NOT NULL,
1500
1626
  KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1501
1627
) ENGINE=MyISAM
1502
1628
drop table t1;
1503
 
create temporary table t1 (a varchar(2048), key `a` (a)) ENGINE=MyISAM;
1504
 
Warnings:
1505
 
Warning 1071    Specified key was too long; max key length is 1332 bytes
1506
 
show create table t1;
1507
 
Table   Create Table
1508
 
t1      CREATE TEMPORARY TABLE `t1` (
1509
 
  `a` varchar(2048) DEFAULT NULL,
1510
 
  KEY `a` (`a`(333))
1511
 
) ENGINE=MyISAM
1512
 
drop table t1;
1513
 
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1024) ENGINE=MyISAM;
1514
 
Warnings:
1515
 
Warning 1071    Specified key was too long; max key length is 1332 bytes
1516
 
show create table t1;
1517
 
Table   Create Table
1518
 
t1      CREATE TEMPORARY TABLE `t1` (
1519
 
  `a` varchar(2048) DEFAULT NULL,
1520
 
  KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
1521
 
) ENGINE=MyISAM
1522
 
drop table t1;
1523
 
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=1024;
1524
 
Warnings:
1525
 
Warning 1071    Specified key was too long; max key length is 1332 bytes
1526
 
show create table t1;
1527
 
Table   Create Table
1528
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1629
create table t1 (a varchar(2048), key `a` (a)) ENGINE=MyISAM;
 
1630
Warnings:
 
1631
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1632
show create table t1;
 
1633
Table   Create Table
 
1634
t1      CREATE TABLE `t1` (
 
1635
  `a` varchar(2048) DEFAULT NULL,
 
1636
  KEY `a` (`a`())
 
1637
) ENGINE=MyISAM
 
1638
drop table t1;
 
1639
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024) ENGINE=MyISAM;
 
1640
Warnings:
 
1641
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1642
show create table t1;
 
1643
Table   Create Table
 
1644
t1      CREATE TABLE `t1` (
 
1645
  `a` varchar(2048) DEFAULT NULL,
 
1646
  KEY `a` (`a`()) KEY_BLOCK_SIZE=6144
 
1647
) ENGINE=MyISAM
 
1648
drop table t1;
 
1649
create table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=1024;
 
1650
Warnings:
 
1651
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1652
show create table t1;
 
1653
Table   Create Table
 
1654
t1      CREATE TABLE `t1` (
1529
1655
  `a` int NOT NULL,
1530
1656
  `b` varchar(2048) DEFAULT NULL,
1531
1657
  KEY `a` (`a`),
1532
 
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=6144
 
1658
  KEY `b` (`b`()) KEY_BLOCK_SIZE=6144
1533
1659
) ENGINE=MyISAM KEY_BLOCK_SIZE=1024
1534
1660
alter table t1 key_block_size=2048;
1535
1661
show create table t1;
1536
1662
Table   Create Table
1537
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1663
t1      CREATE TABLE `t1` (
1538
1664
  `a` int NOT NULL,
1539
1665
  `b` varchar(2048) DEFAULT NULL,
1540
1666
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1541
 
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192
 
1667
  KEY `b` (`b`()) KEY_BLOCK_SIZE=8192
1542
1668
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1543
1669
alter table t1 add c int, add key (c);
1544
1670
show create table t1;
1545
1671
Table   Create Table
1546
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1672
t1      CREATE TABLE `t1` (
1547
1673
  `a` int NOT NULL,
1548
1674
  `b` varchar(2048) DEFAULT NULL,
1549
1675
  `c` int DEFAULT NULL,
1550
1676
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1551
 
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
 
1677
  KEY `b` (`b`()) KEY_BLOCK_SIZE=8192,
1552
1678
  KEY `c` (`c`)
1553
1679
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
1554
1680
alter table t1 key_block_size=0;
1555
1681
alter table t1 add d int, add key (d);
1556
1682
show create table t1;
1557
1683
Table   Create Table
1558
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1684
t1      CREATE TABLE `t1` (
1559
1685
  `a` int NOT NULL,
1560
1686
  `b` varchar(2048) DEFAULT NULL,
1561
1687
  `c` int DEFAULT NULL,
1562
1688
  `d` int DEFAULT NULL,
1563
1689
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1564
 
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
 
1690
  KEY `b` (`b`()) KEY_BLOCK_SIZE=8192,
1565
1691
  KEY `c` (`c`) KEY_BLOCK_SIZE=2048,
1566
1692
  KEY `d` (`d`)
1567
1693
) ENGINE=MyISAM
1568
1694
drop table t1;
1569
 
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=8192;
 
1695
create table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=8192;
1570
1696
Warnings:
1571
1697
Warning 1071    Specified key was too long; max key length is 1332 bytes
1572
1698
show create table t1;
1573
1699
Table   Create Table
1574
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1700
t1      CREATE TABLE `t1` (
1575
1701
  `a` int NOT NULL,
1576
1702
  `b` varchar(2048) DEFAULT NULL,
1577
1703
  KEY `a` (`a`),
1578
 
  KEY `b` (`b`(333))
 
1704
  KEY `b` (`b`())
1579
1705
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1580
1706
drop table t1;
1581
 
create temporary table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) ENGINE=MyISAM key_block_size=8192;
 
1707
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) ENGINE=MyISAM key_block_size=8192;
1582
1708
Warnings:
1583
1709
Warning 1071    Specified key was too long; max key length is 1332 bytes
1584
1710
show create table t1;
1585
1711
Table   Create Table
1586
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1712
t1      CREATE TABLE `t1` (
1587
1713
  `a` int NOT NULL,
1588
1714
  `b` varchar(2048) DEFAULT NULL,
1589
1715
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1590
 
  KEY `b` (`b`(333))
 
1716
  KEY `b` (`b`())
1591
1717
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
1592
1718
drop table t1;
1593
 
create temporary table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) ENGINE=MyISAM key_block_size=16384;
 
1719
create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) ENGINE=MyISAM key_block_size=16384;
1594
1720
show create table t1;
1595
1721
Table   Create Table
1596
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1722
t1      CREATE TABLE `t1` (
1597
1723
  `a` int NOT NULL,
1598
1724
  `b` int DEFAULT NULL,
1599
1725
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
1600
1726
  KEY `b` (`b`) KEY_BLOCK_SIZE=8192
1601
1727
) ENGINE=MyISAM KEY_BLOCK_SIZE=16384
1602
1728
drop table t1;
1603
 
create temporary table t1 (a int not null, key `a` (a) key_block_size=512) ENGINE=MyISAM;
 
1729
create table t1 (a int not null, key `a` (a) key_block_size=512) ENGINE=MyISAM;
1604
1730
show create table t1;
1605
1731
Table   Create Table
1606
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1732
t1      CREATE TABLE `t1` (
1607
1733
  `a` int NOT NULL,
1608
1734
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024
1609
1735
) ENGINE=MyISAM
1610
1736
drop table t1;
1611
 
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000) ENGINE=MyISAM;
 
1737
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000) ENGINE=MyISAM;
1612
1738
Warnings:
1613
1739
Warning 1071    Specified key was too long; max key length is 1332 bytes
1614
1740
show create table t1;
1615
1741
Table   Create Table
1616
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1742
t1      CREATE TABLE `t1` (
1617
1743
  `a` varchar(2048) DEFAULT NULL,
1618
 
  KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
 
1744
  KEY `a` (`a`()) KEY_BLOCK_SIZE=6144
1619
1745
) ENGINE=MyISAM
1620
1746
drop table t1;
1621
 
create temporary table t1 (a int not null, key `a` (a) key_block_size=1025) ENGINE=MyISAM;
 
1747
create table t1 (a int not null, key `a` (a) key_block_size=1025) ENGINE=MyISAM;
1622
1748
show create table t1;
1623
1749
Table   Create Table
1624
 
t1      CREATE TEMPORARY TABLE `t1` (
 
1750
t1      CREATE TABLE `t1` (
1625
1751
  `a` int NOT NULL,
1626
1752
  KEY `a` (`a`) KEY_BLOCK_SIZE=2048
1627
1753
) ENGINE=MyISAM
1628
1754
drop table t1;
1629
 
create temporary table t1 (a int not null, key key_block_size=1024 (a)) ENGINE=MyISAM;
 
1755
create table t1 (a int not null, key key_block_size=1024 (a)) ENGINE=MyISAM;
1630
1756
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '=1024 (a)) ENGINE=MyISAM' at line 1
1631
 
create temporary table t1 (a int not null, key `a` key_block_size=1024 (a)) ENGINE=MyISAM;
 
1757
create table t1 (a int not null, key `a` key_block_size=1024 (a)) ENGINE=MyISAM;
1632
1758
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'key_block_size=1024 (a)) ENGINE=MyISAM' at line 1
1633
 
CREATE temporary TABLE t1 (
 
1759
CREATE TABLE t1 (
1634
1760
c1 INT,
1635
1761
c2 VARCHAR(300),
1636
1762
KEY (c1) KEY_BLOCK_SIZE 1024,
1662
1788
(33, REPEAT('x', CEIL(RAND() * 300))),
1663
1789
(34, REPEAT('y', CEIL(RAND() * 300))),
1664
1790
(35, REPEAT('z', CEIL(RAND() * 300)));
1665
 
CREATE TEMPORARY TABLE t2 AS SELECT * FROM t1;
1666
 
INSERT INTO t1 SELECT * FROM t2;
1667
 
DROP TABLE t2;
1668
 
CREATE TEMPORARY TABLE t2 AS SELECT * FROM t1;
1669
 
INSERT INTO t1 SELECT * FROM t2;
1670
 
DROP TABLE t2;
 
1791
INSERT INTO t1 SELECT * FROM t1;
 
1792
INSERT INTO t1 SELECT * FROM t1;
1671
1793
CHECK TABLE t1;
1672
1794
Table   Op      Msg_type        Msg_text
1673
1795
test.t1 check   status  OK
 
1796
REPAIR TABLE t1;
 
1797
Table   Op      Msg_type        Msg_text
 
1798
test.t1 repair  status  OK
1674
1799
DELETE FROM t1 WHERE c1 >= 10;
1675
1800
CHECK TABLE t1;
1676
1801
Table   Op      Msg_type        Msg_text
1677
1802
test.t1 check   status  OK
1678
1803
DROP TABLE t1;
1679
 
CREATE temporary TABLE t1 (
1680
 
c1 CHAR(130),
1681
 
c2 VARCHAR(1)
1682
 
) ENGINE=MyISAM;
1683
 
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
1684
 
SELECT COUNT(*) FROM t1;
1685
 
COUNT(*)
1686
 
1
1687
 
CHECK TABLE t1;
1688
 
Table   Op      Msg_type        Msg_text
1689
 
test.t1 check   status  OK
1690
 
SELECT COUNT(*) FROM t1;
1691
 
COUNT(*)
1692
 
1
1693
 
CHECK TABLE t1;
1694
 
Table   Op      Msg_type        Msg_text
1695
 
test.t1 check   status  OK
1696
 
DROP TABLE t1;
1697
 
CREATE temporary TABLE t1 (
1698
 
c1 CHAR(130),
1699
 
c2 VARCHAR(1)
1700
 
) ENGINE=MyISAM;
1701
 
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
1702
 
SELECT COUNT(*) FROM t1;
1703
 
COUNT(*)
1704
 
1
1705
 
CHECK TABLE t1;
1706
 
Table   Op      Msg_type        Msg_text
1707
 
test.t1 check   status  OK
1708
 
SELECT COUNT(*) FROM t1;
1709
 
COUNT(*)
1710
 
1
1711
 
CHECK TABLE t1;
1712
 
Table   Op      Msg_type        Msg_text
1713
 
test.t1 check   status  OK
1714
 
DROP TABLE t1;
1715
 
CREATE temporary TABLE t1 (
 
1804
CREATE TABLE t1 (
 
1805
c1 CHAR(130),
 
1806
c2 VARCHAR(1)
 
1807
) ENGINE=MyISAM;
 
1808
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 
1809
SELECT COUNT(*) FROM t1;
 
1810
COUNT(*)
 
1811
1
 
1812
CHECK TABLE t1;
 
1813
Table   Op      Msg_type        Msg_text
 
1814
test.t1 check   status  OK
 
1815
REPAIR TABLE t1;
 
1816
Table   Op      Msg_type        Msg_text
 
1817
test.t1 repair  status  OK
 
1818
SELECT COUNT(*) FROM t1;
 
1819
COUNT(*)
 
1820
1
 
1821
CHECK TABLE t1;
 
1822
Table   Op      Msg_type        Msg_text
 
1823
test.t1 check   status  OK
 
1824
DROP TABLE t1;
 
1825
CREATE TABLE t1 (
 
1826
c1 CHAR(130),
 
1827
c2 VARCHAR(1)
 
1828
) ENGINE=MyISAM;
 
1829
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
 
1830
SELECT COUNT(*) FROM t1;
 
1831
COUNT(*)
 
1832
1
 
1833
CHECK TABLE t1 EXTENDED;
 
1834
Table   Op      Msg_type        Msg_text
 
1835
test.t1 check   status  OK
 
1836
REPAIR TABLE t1 EXTENDED;
 
1837
Table   Op      Msg_type        Msg_text
 
1838
test.t1 repair  status  OK
 
1839
SELECT COUNT(*) FROM t1;
 
1840
COUNT(*)
 
1841
1
 
1842
CHECK TABLE t1 EXTENDED;
 
1843
Table   Op      Msg_type        Msg_text
 
1844
test.t1 check   status  OK
 
1845
DROP TABLE t1;
 
1846
CREATE TABLE t1 (
1716
1847
c1 CHAR(130),
1717
1848
c2 VARCHAR(1)
1718
1849
) ENGINE=MyISAM;
1723
1854
SELECT COUNT(*) FROM t1;
1724
1855
COUNT(*)
1725
1856
2
1726
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1857
OPTIMIZE TABLE t1;
 
1858
Table   Op      Msg_type        Msg_text
 
1859
test.t1 optimize        status  OK
1727
1860
SELECT COUNT(*) FROM t1;
1728
1861
COUNT(*)
1729
1862
2
1730
1863
DROP TABLE t1;
1731
 
CREATE temporary TABLE t1 (
 
1864
CREATE TABLE t1 (
1732
1865
c1 CHAR(130),
1733
1866
c2 VARCHAR(1),
1734
1867
KEY (c1)
1745
1878
CHECK TABLE t1;
1746
1879
Table   Op      Msg_type        Msg_text
1747
1880
test.t1 check   status  OK
1748
 
CHECK TABLE t1;
1749
 
Table   Op      Msg_type        Msg_text
1750
 
test.t1 check   status  OK
1751
 
DROP TABLE t1;
1752
 
CREATE temporary TABLE t1 (
1753
 
c1 CHAR(50),
1754
 
c2 VARCHAR(1)
1755
 
) ENGINE=MyISAM;
1756
 
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1757
 
SELECT COUNT(*) FROM t1;
1758
 
COUNT(*)
1759
 
1
1760
 
CHECK TABLE t1;
1761
 
Table   Op      Msg_type        Msg_text
1762
 
test.t1 check   status  OK
1763
 
SELECT COUNT(*) FROM t1;
1764
 
COUNT(*)
1765
 
1
1766
 
CHECK TABLE t1;
1767
 
Table   Op      Msg_type        Msg_text
1768
 
test.t1 check   status  OK
1769
 
DROP TABLE t1;
1770
 
CREATE temporary TABLE t1 (
1771
 
c1 CHAR(50),
1772
 
c2 VARCHAR(1)
1773
 
) ENGINE=MyISAM;
1774
 
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1775
 
SELECT COUNT(*) FROM t1;
1776
 
COUNT(*)
1777
 
1
1778
 
CHECK TABLE t1;
1779
 
Table   Op      Msg_type        Msg_text
1780
 
test.t1 check   status  OK
1781
 
SELECT COUNT(*) FROM t1;
1782
 
COUNT(*)
1783
 
1
1784
 
CHECK TABLE t1;
1785
 
Table   Op      Msg_type        Msg_text
1786
 
test.t1 check   status  OK
1787
 
DROP TABLE t1;
1788
 
CREATE temporary TABLE t1 (
 
1881
CHECK TABLE t1 EXTENDED;
 
1882
Table   Op      Msg_type        Msg_text
 
1883
test.t1 check   status  OK
 
1884
DROP TABLE t1;
 
1885
CREATE TABLE t1 (
 
1886
c1 CHAR(50),
 
1887
c2 VARCHAR(1)
 
1888
) ENGINE=MyISAM;
 
1889
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
 
1890
SELECT COUNT(*) FROM t1;
 
1891
COUNT(*)
 
1892
1
 
1893
CHECK TABLE t1;
 
1894
Table   Op      Msg_type        Msg_text
 
1895
test.t1 check   status  OK
 
1896
REPAIR TABLE t1;
 
1897
Table   Op      Msg_type        Msg_text
 
1898
test.t1 repair  status  OK
 
1899
SELECT COUNT(*) FROM t1;
 
1900
COUNT(*)
 
1901
1
 
1902
CHECK TABLE t1;
 
1903
Table   Op      Msg_type        Msg_text
 
1904
test.t1 check   status  OK
 
1905
DROP TABLE t1;
 
1906
CREATE TABLE t1 (
 
1907
c1 CHAR(50),
 
1908
c2 VARCHAR(1)
 
1909
) ENGINE=MyISAM;
 
1910
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
 
1911
SELECT COUNT(*) FROM t1;
 
1912
COUNT(*)
 
1913
1
 
1914
CHECK TABLE t1 EXTENDED;
 
1915
Table   Op      Msg_type        Msg_text
 
1916
test.t1 check   status  OK
 
1917
REPAIR TABLE t1 EXTENDED;
 
1918
Table   Op      Msg_type        Msg_text
 
1919
test.t1 repair  status  OK
 
1920
SELECT COUNT(*) FROM t1;
 
1921
COUNT(*)
 
1922
1
 
1923
CHECK TABLE t1 EXTENDED;
 
1924
Table   Op      Msg_type        Msg_text
 
1925
test.t1 check   status  OK
 
1926
DROP TABLE t1;
 
1927
CREATE TABLE t1 (
1789
1928
c1 CHAR(50),
1790
1929
c2 VARCHAR(1)
1791
1930
) ENGINE=MyISAM;
1796
1935
SELECT COUNT(*) FROM t1;
1797
1936
COUNT(*)
1798
1937
2
1799
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1938
OPTIMIZE TABLE t1;
 
1939
Table   Op      Msg_type        Msg_text
 
1940
test.t1 optimize        status  OK
1800
1941
SELECT COUNT(*) FROM t1;
1801
1942
COUNT(*)
1802
1943
2
1803
1944
DROP TABLE t1;
1804
 
CREATE temporary TABLE t1 (
 
1945
CREATE TABLE t1 (
1805
1946
c1 CHAR(50),
1806
1947
c2 VARCHAR(1),
1807
1948
KEY (c1)
1818
1959
CHECK TABLE t1;
1819
1960
Table   Op      Msg_type        Msg_text
1820
1961
test.t1 check   status  OK
1821
 
CHECK TABLE t1;
 
1962
CHECK TABLE t1 EXTENDED;
1822
1963
Table   Op      Msg_type        Msg_text
1823
1964
test.t1 check   status  OK
1824
1965
DROP TABLE t1;