~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Stewart Smith
  • Date: 2009-06-16 00:45:15 UTC
  • mto: (1119.2.6 merge)
  • mto: This revision was merged to the branch mainline in revision 1124.
  • Revision ID: stewart@flamingspork.com-20090616004515-bgr8e62psvn2820l
make snowman test not leave tables behind after running

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
Table   Op      Msg_type        Msg_text
15
15
test.t1 check   status  OK
16
16
drop table t1;
17
 
create temporary table t1 (a int not null auto_increment, b blob not null, primary key (a)) engine=myisam;
 
17
create table t1 (a int not null auto_increment, b blob not null, primary key (a));
18
18
check table t1;
19
19
Table   Op      Msg_type        Msg_text
20
20
test.t1 check   status  OK
23
23
Table   Op      Msg_type        Msg_text
24
24
test.t1 check   status  OK
25
25
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;
 
26
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
27
27
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      YES     PRIMARY 1       a
32
 
t1      NO      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      YES     PRIMARY 1       a
37
 
t1      NO      b       1       b
 
28
optimize table t1;
 
29
Table   Op      Msg_type        Msg_text
 
30
test.t1 optimize        status  OK
 
31
show index from t1;
 
32
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
33
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
 
34
t1      1       b       1       b       A       5       NULL    NULL            BTREE           
 
35
optimize table t1;
 
36
Table   Op      Msg_type        Msg_text
 
37
test.t1 optimize        status  OK
 
38
show index from t1;
 
39
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
40
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
 
41
t1      1       b       1       b       A       5       NULL    NULL            BTREE           
38
42
drop table t1;
39
43
create temporary table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
40
44
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
63
67
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
64
68
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       
65
69
drop table t1;
66
 
create temporary table t1 ( t1 char(255), key(t1(250))) ENGINE=MYISAM;
 
70
create table t1 ( t1 char(255), key(t1(250)));
 
71
Warnings:
 
72
Warning 1071    Specified key was too long; max key length is 767 bytes
67
73
insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169');
68
74
insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203');
69
75
insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767');
93
99
insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'),
94
100
('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'),
95
101
('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47');
96
 
alter table t1 ENGINE=myisam;
 
102
optimize table t1;
 
103
Table   Op      Msg_type        Msg_text
 
104
test.t1 optimize        status  OK
97
105
check table t1;
98
106
Table   Op      Msg_type        Msg_text
99
107
test.t1 check   status  OK
304
312
DROP TABLE t1;
305
313
CREATE TEMPORARY TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) ENGINE=MyISAM;
306
314
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
307
 
create temporary table t2 (a int not null, b int, c int, key(b), key(c), key(a)) engine=myisam;
 
315
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
308
316
INSERT into t2 values (1,1,1), (2,2,2);
309
 
alter table t1 ENGINE=MYISAM;
 
317
optimize table t1;
 
318
Table   Op      Msg_type        Msg_text
 
319
test.t1 optimize        status  OK
310
320
show index from t1;
311
 
Table   Unique  Key_name        Seq_in_index    Column_name
312
 
t1      NO      b       1       b
313
 
t1      NO      c       1       c
314
 
t1      NO      a       1       a
315
 
t1      NO      a       2       b
316
 
t1      NO      c_2     1       c
317
 
t1      NO      c_2     2       a
 
321
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
322
t1      1       b       1       b       A       5       NULL    NULL    YES     BTREE           
 
323
t1      1       c       1       c       A       5       NULL    NULL    YES     BTREE           
 
324
t1      1       a       1       a       A       1       NULL    NULL            BTREE           
 
325
t1      1       a       2       b       A       5       NULL    NULL    YES     BTREE           
 
326
t1      1       c_2     1       c       A       5       NULL    NULL    YES     BTREE           
 
327
t1      1       c_2     2       a       A       5       NULL    NULL            BTREE           
318
328
explain select * from t1,t2 where t1.a=t2.a;
319
329
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
320
330
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
321
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
331
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
322
332
explain select * from t1,t2 force index(a) where t1.a=t2.a;
323
333
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
324
334
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
325
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
335
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
326
336
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
327
337
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
328
338
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
329
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
339
1       SIMPLE  t1      ref     a       a       4       test.t2.a       3       
330
340
explain select * from t1,t2 where t1.b=t2.b;
331
341
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
332
342
1       SIMPLE  t2      ALL     b       NULL    NULL    NULL    2       
333
 
1       SIMPLE  t1      ALL     b       NULL    NULL    NULL    5       Using where; Using join buffer
 
343
1       SIMPLE  t1      ref     b       b       5       test.t2.b       1       
334
344
explain select * from t1,t2 force index(c) where t1.a=t2.a;
335
345
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
336
346
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    2       
337
 
1       SIMPLE  t1      ref     a       a       4       test.t2.a       1       
 
347
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where; Using join buffer
338
348
explain select * from t1 where a=0 or a=2;
339
349
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
340
350
1       SIMPLE  t1      ALL     a       NULL    NULL    NULL    5       Using where
343
353
1       SIMPLE  t1      range   a       a       4       NULL    4       Using where
344
354
explain select * from t1 where c=1;
345
355
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
346
 
1       SIMPLE  t1      ref     c,c_2   c       5       const   1       Using where
 
356
1       SIMPLE  t1      ref     c,c_2   c       5       const   1       
347
357
explain select * from t1 use index() where c=1;
348
358
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
349
359
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    5       Using where
350
360
drop table t1,t2;
351
 
create temporary table t1 (a int not null auto_increment primary key, b varchar(255)) engine=myisam;
 
361
create table t1 (a int not null auto_increment primary key, b varchar(255));
352
362
insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100));
353
363
update t1 set b=repeat(left(b,1),200) where a=1;
354
364
delete from t1 where (a mod 2) = 0;
413
423
Table   Op      Msg_type        Msg_text
414
424
test.t1 check   status  OK
415
425
DROP TABLE t1;
416
 
create temporary table t1 (a blob) engine=myisam;
 
426
create table t1 (a blob);
417
427
insert into t1 values('a '),('a');
418
428
select concat(a,'.') from t1 where a='a';
419
429
concat(a,'.')
429
439
concat(a,'.')
430
440
a .
431
441
drop table t1;
432
 
create temporary table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))) engine=myisam;
 
442
create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20)));
433
443
insert into t1 (b) values ('a'),('b'),('c');
434
444
select concat(b,'.') from t1;
435
445
concat(b,'.')
444
454
select * from t1;
445
455
a       b
446
456
1       a
447
 
2       b  
 
457
2       b 
448
458
3       c
449
459
delete from t1 where b='b';
450
460
select a,concat(b,'.') from t1;
452
462
1       a.
453
463
3       c.
454
464
drop table t1;
455
 
create temporary table t1 (a int not null) engine=myisam;
456
 
create temporary table t2 (a int not null, primary key (a)) engine=myisam;
 
465
create table t1 (a int not null);
 
466
create table t2 (a int not null, primary key (a));
457
467
insert into t1 values (1);
458
468
insert into t2 values (1),(2);
459
469
select sql_big_result distinct t1.a from t1,t2 order by t2.a;
467
477
1
468
478
explain select sql_big_result distinct t1.a from t1,t2 order by t2.a;
469
479
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
470
 
1       SIMPLE  t1      system  NULL    NULL    NULL    NULL    1       Using temporary
471
 
1       SIMPLE  t2      index   NULL    PRIMARY 4       NULL    2       Using index; Distinct
 
480
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1       Using temporary; Using filesort
 
481
1       SIMPLE  t2      index   NULL    PRIMARY 4       NULL    2       Using index; Distinct; Using join buffer
472
482
explain select distinct t1.a from t1,t2 order by t2.a;
473
483
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
474
 
1       SIMPLE  t1      system  NULL    NULL    NULL    NULL    1       Using temporary
475
 
1       SIMPLE  t2      index   NULL    PRIMARY 4       NULL    2       Using index; Distinct
 
484
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1       Using temporary; Using filesort
 
485
1       SIMPLE  t2      index   NULL    PRIMARY 4       NULL    2       Using index; Distinct; Using join buffer
476
486
drop table t1,t2;
477
487
create temporary table t1 (
478
488
c1 varchar(32),
484
494
c1
485
495
a
486
496
drop table t1;
487
 
create temporary table t1 (a int, b varchar(200), c text not null) engine=myisam;
488
 
create temporary table t2 (a int, b varchar(200), c text not null) engine=myisam;
 
497
create table t1 (a int, b varchar(200), c text not null);
 
498
create table t2 (a int, b varchar(200), c text not null);
489
499
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
490
500
insert t2 select * from t1;
491
 
show table status;
492
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
493
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
494
 
#       test    t2      TEMPORARY       MyISAM  #       #       #       #       #
 
501
checksum table t1, t2, t3 quick;
 
502
Table   Checksum
 
503
test.t1 NULL
 
504
test.t2 NULL
 
505
test.t3 NULL
 
506
Warnings:
 
507
Error   1146    Table 'test.t3' doesn't exist
 
508
checksum table t1, t2, t3;
 
509
Table   Checksum
 
510
test.t1 2948697075
 
511
test.t2 2948697075
 
512
test.t3 NULL
 
513
Warnings:
 
514
Error   1146    Table 'test.t3' doesn't exist
 
515
checksum table t1, t2, t3 extended;
 
516
Table   Checksum
 
517
test.t1 2948697075
 
518
test.t2 2948697075
 
519
test.t3 NULL
 
520
Warnings:
 
521
Error   1146    Table 'test.t3' doesn't exist
495
522
drop table t1,t2;
496
 
create temporary table t1 ( a tinytext, b char(1), index idx (a(1),b) ) engine=myisam;
 
523
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
497
524
insert into t1 values (null,''), (null,'');
498
525
explain select count(*) from t1 where a is null;
499
526
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
502
529
count(*)
503
530
2
504
531
drop table t1;
505
 
create temporary table t1 (c1 int, c2 varchar(4) not null default '',
506
 
key(c2(3))) engine=myisam;
 
532
create table t1 (c1 int, c2 varchar(4) not null default '',
 
533
key(c2(3)));
507
534
insert into t1 values (1,'A'), (2, 'B'), (3, 'A');
508
535
update t1 set c2='A  B' where c1=2;
509
536
check table t1;
510
537
Table   Op      Msg_type        Msg_text
511
538
test.t1 check   status  OK
512
539
drop table t1;
513
 
create temporary table t1(
 
540
create table t1 (c1 int);
 
541
insert into t1 values (1),(2),(3),(4);
 
542
checksum table t1;
 
543
Table   Checksum
 
544
test.t1 149057747
 
545
delete from t1 where c1 = 1;
 
546
create table t2 as select * from t1;
 
547
checksum table t1;
 
548
Table   Checksum
 
549
test.t1 984116287
 
550
checksum table t2;
 
551
Table   Checksum
 
552
test.t2 984116287
 
553
drop table t1, t2;
 
554
create table t1(
514
555
cip INT NOT NULL,
515
556
score INT NOT NULL DEFAULT 0,
516
557
bob TINYBLOB
517
 
) engine=myisam;
 
558
);
518
559
insert into t1 (cip) VALUES (1), (2), (3);
519
560
insert into t1 (cip, bob) VALUES (4, 'a' ), (5, 'b'), 
520
561
(6, 'c');
557
598
MAX(a)
558
599
1
559
600
DROP TABLE t1;
 
601
SET GLOBAL myisam_repair_threads=2;
 
602
SHOW VARIABLES LIKE 'myisam_repair%';
 
603
Variable_name   Value
 
604
myisam_repair_threads   2
560
605
CREATE TEMPORARY TABLE t1 (
561
606
`_id` int NOT NULL default '0',
562
607
`url` text,
596
641
8
597
642
9
598
643
DELETE FROM t1 WHERE _id < 8;
599
 
show table status LIKE 't1';
600
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
601
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
602
 
CHECK TABLE t1;
603
 
Table   Op      Msg_type        Msg_text
604
 
test.t1 check   status  OK
605
 
ALTER TABLE t1 ENGINE=MYISAM;
606
 
CHECK TABLE t1;
607
 
Table   Op      Msg_type        Msg_text
608
 
test.t1 check   status  OK
609
 
show table status LIKE 't1';
610
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
611
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
644
SHOW TABLE STATUS LIKE 't1';
 
645
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
 
646
CHECK TABLE t1 EXTENDED;
 
647
Table   Op      Msg_type        Msg_text
 
648
test.t1 check   status  OK
 
649
OPTIMIZE TABLE t1;
 
650
Table   Op      Msg_type        Msg_text
 
651
test.t1 optimize        status  OK
 
652
CHECK TABLE t1 EXTENDED;
 
653
Table   Op      Msg_type        Msg_text
 
654
test.t1 check   status  OK
 
655
SHOW TABLE STATUS LIKE 't1';
 
656
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
612
657
SELECT _id FROM t1;
613
658
_id
614
659
8
615
660
9
616
661
DROP TABLE t1;
 
662
SET GLOBAL myisam_repair_threads=1;
 
663
SHOW VARIABLES LIKE 'myisam_repair%';
 
664
Variable_name   Value
 
665
myisam_repair_threads   1
617
666
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM;
618
 
show table status like 't1';
619
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
620
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
667
SHOW TABLE STATUS LIKE 't1';
 
668
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
621
669
DROP TABLE t1;
622
670
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
623
671
INSERT INTO t1 VALUES
778
826
insert into t1 values('+ ', '+ ', '+ ');
779
827
set @a=repeat(' ',20);
780
828
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
781
 
ERROR 22001: Data too long for column 'v' at row 1
782
 
set @a=repeat(' ',10);
783
 
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
784
 
ERROR 22001: Data too long for column 'v' at row 1
785
 
set @a=repeat(' ',9);
786
 
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
 
829
Warnings:
 
830
Note    1265    Data truncated for column 'v' at row 1
 
831
Note    1265    Data truncated for column 'c' at row 1
787
832
select concat('*',v,'*',c,'*',t,'*') from t1;
788
833
concat('*',v,'*',c,'*',t,'*')
789
834
*+ *+ *+ *
790
 
*+         *+         *+         *
 
835
*+         *+         *+                    *
791
836
show create table t1;
792
837
Table   Create Table
793
838
t1      CREATE TEMPORARY TABLE `t1` (
794
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
795
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
796
 
  `t` TEXT COLLATE utf8_general_ci
797
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
839
  `v` varchar(10) DEFAULT NULL,
 
840
  `c` varchar(10) DEFAULT NULL,
 
841
  `t` text
 
842
) ENGINE=MyISAM
798
843
create TEMPORARY table t2 like t1;
799
844
show create table t2;
800
845
Table   Create Table
801
846
t2      CREATE TEMPORARY TABLE `t2` (
802
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
803
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
804
 
  `t` TEXT COLLATE utf8_general_ci
805
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
847
  `v` varchar(10) DEFAULT NULL,
 
848
  `c` varchar(10) DEFAULT NULL,
 
849
  `t` text
 
850
) ENGINE=MyISAM
806
851
create TEMPORARY table t3 select * from t1;
807
852
show create table t3;
808
853
Table   Create Table
809
854
t3      CREATE TEMPORARY TABLE `t3` (
810
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
811
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
812
 
  `t` TEXT COLLATE utf8_general_ci
813
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
855
  `v` varchar(10) DEFAULT NULL,
 
856
  `c` varchar(10) DEFAULT NULL,
 
857
  `t` text
 
858
) ENGINE=MyISAM
814
859
alter table t1 modify c varchar(10);
815
860
show create table t1;
816
861
Table   Create Table
817
862
t1      CREATE TEMPORARY TABLE `t1` (
818
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
819
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
820
 
  `t` TEXT COLLATE utf8_general_ci
821
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
863
  `v` varchar(10) DEFAULT NULL,
 
864
  `c` varchar(10) DEFAULT NULL,
 
865
  `t` text
 
866
) ENGINE=MyISAM
822
867
alter table t1 modify v char(10);
823
868
show create table t1;
824
869
Table   Create Table
825
870
t1      CREATE TEMPORARY TABLE `t1` (
826
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
827
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
828
 
  `t` TEXT COLLATE utf8_general_ci
829
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
871
  `v` varchar(10) DEFAULT NULL,
 
872
  `c` varchar(10) DEFAULT NULL,
 
873
  `t` text
 
874
) ENGINE=MyISAM
830
875
alter table t1 modify t varchar(10);
 
876
Warnings:
 
877
Note    1265    Data truncated for column 't' at row 2
831
878
show create table t1;
832
879
Table   Create Table
833
880
t1      CREATE TEMPORARY TABLE `t1` (
834
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
835
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
836
 
  `t` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
837
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
881
  `v` varchar(10) DEFAULT NULL,
 
882
  `c` varchar(10) DEFAULT NULL,
 
883
  `t` varchar(10) DEFAULT NULL
 
884
) ENGINE=MyISAM
838
885
select concat('*',v,'*',c,'*',t,'*') from t1;
839
886
concat('*',v,'*',c,'*',t,'*')
840
887
*+ *+ *+ *
844
891
show create table t1;
845
892
Table   Create Table
846
893
t1      CREATE TEMPORARY TABLE `t1` (
847
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
848
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
849
 
  `t` TEXT COLLATE utf8_general_ci,
 
894
  `v` varchar(10) DEFAULT NULL,
 
895
  `c` varchar(10) DEFAULT NULL,
 
896
  `t` text,
850
897
  KEY `v` (`v`),
851
898
  KEY `c` (`c`),
852
899
  KEY `t` (`t`(10))
853
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
900
) ENGINE=MyISAM
854
901
select count(*) from t1;
855
902
count(*)
856
903
270
1063
1110
show create table t1;
1064
1111
Table   Create Table
1065
1112
t1      CREATE TEMPORARY TABLE `t1` (
1066
 
  `v` VARCHAR(300) COLLATE utf8_general_ci DEFAULT NULL,
1067
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1068
 
  `t` TEXT COLLATE utf8_general_ci,
 
1113
  `v` varchar(300) DEFAULT NULL,
 
1114
  `c` varchar(10) DEFAULT NULL,
 
1115
  `t` text,
1069
1116
  KEY `c` (`c`),
1070
1117
  KEY `t` (`t`(10)),
1071
1118
  KEY `v` (`v`)
1072
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1119
) ENGINE=MyISAM
1073
1120
select count(*) from t1 where v='a';
1074
1121
count(*)
1075
1122
10
1143
1190
show create table t1;
1144
1191
Table   Create Table
1145
1192
t1      CREATE TEMPORARY TABLE `t1` (
1146
 
  `v` VARCHAR(300) COLLATE utf8_general_ci DEFAULT NULL,
1147
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1148
 
  `t` TEXT COLLATE utf8_general_ci,
 
1193
  `v` varchar(300) DEFAULT NULL,
 
1194
  `c` varchar(10) DEFAULT NULL,
 
1195
  `t` text,
1149
1196
  KEY `c` (`c`),
1150
1197
  KEY `t` (`t`(10)),
1151
1198
  KEY `v` (`v`(30))
1152
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1199
) ENGINE=MyISAM
1153
1200
select count(*) from t1 where v='a';
1154
1201
count(*)
1155
1202
10
1225
1272
show create table t1;
1226
1273
Table   Create Table
1227
1274
t1      CREATE TEMPORARY TABLE `t1` (
1228
 
  `v` VARCHAR(600) COLLATE utf8_general_ci DEFAULT NULL,
1229
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1230
 
  `t` TEXT COLLATE utf8_general_ci,
 
1275
  `v` varchar(600) DEFAULT NULL,
 
1276
  `c` varchar(10) DEFAULT NULL,
 
1277
  `t` text,
1231
1278
  KEY `c` (`c`),
1232
1279
  KEY `t` (`t`(10)),
1233
1280
  KEY `v` (`v`(333))
1234
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1281
) ENGINE=MyISAM
1235
1282
select v,count(*) from t1 group by v limit 10;
1236
1283
v       count(*)
1237
1284
a      1
1279
1326
insert into t1 values ('a     ');
1280
1327
ERROR 23000: Duplicate entry 'a     ' for key 'a'
1281
1328
insert into t1 values ('a          ');
1282
 
ERROR 22001: Data too long for column 'a' at row 1
 
1329
ERROR 23000: Duplicate entry 'a         ' for key 'a'
1283
1330
insert into t1 values ('a ');
1284
1331
ERROR 23000: Duplicate entry 'a ' for key 'a'
1285
1332
update t1 set a='a  ' where a like 'a%';
1303
1350
show create table t1;
1304
1351
Table   Create Table
1305
1352
t1      CREATE TEMPORARY TABLE `t1` (
1306
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1307
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1308
 
  `t` TEXT COLLATE utf8_general_ci,
 
1353
  `v` varchar(10) DEFAULT NULL,
 
1354
  `c` varchar(10) DEFAULT NULL,
 
1355
  `t` text,
1309
1356
  KEY `v` (`v`(5)),
1310
1357
  KEY `c` (`c`(5)),
1311
1358
  KEY `t` (`t`(5))
1312
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1359
) ENGINE=MyISAM
1313
1360
drop table t1;
1314
1361
create TEMPORARY table t1 (v char(10));
1315
1362
show create table t1;
1316
1363
Table   Create Table
1317
1364
t1      CREATE TEMPORARY TABLE `t1` (
1318
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
1319
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1365
  `v` varchar(10) DEFAULT NULL
 
1366
) ENGINE=MyISAM
1320
1367
drop table t1;
1321
 
create TEMPORARY table t1 (v varchar(10), c char(10));
 
1368
create TEMPORARY table t1 (v varchar(10), c char(10)) row_format=fixed;
1322
1369
show create table t1;
1323
1370
Table   Create Table
1324
1371
t1      CREATE TEMPORARY TABLE `t1` (
1325
 
  `v` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
1326
 
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
1327
 
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
1372
  `v` varchar(10) DEFAULT NULL,
 
1373
  `c` varchar(10) DEFAULT NULL
 
1374
) ENGINE=MyISAM ROW_FORMAT=FIXED
1328
1375
insert into t1 values('a','a'),('a ','a ');
1329
1376
select concat('*',v,'*',c,'*') from t1;
1330
1377
concat('*',v,'*',c,'*')
1349
1396
create temporary table t1 (v varchar(65535));
1350
1397
ERROR 42000: Column length too big for column 'v' (max = 16383); use BLOB or TEXT instead
1351
1398
set storage_engine=InnoDB;
1352
 
create temporary table t1 (a int, key(a)) engine=myisam;
 
1399
create table t1 (a int, key(a));
1353
1400
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
1354
1401
analyze table t1;
1355
1402
Table   Op      Msg_type        Msg_text
1356
 
test.t1 analyze note    The storage engine for the table doesn't support analyze
 
1403
test.t1 analyze status  OK
1357
1404
show keys from t1;
1358
 
Table   Unique  Key_name        Seq_in_index    Column_name
1359
 
t1      NO      a       1       a
 
1405
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
1406
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
1360
1407
alter table t1 disable keys;
 
1408
Warnings:
 
1409
Note    1031    Table storage engine for 't1' doesn't have this option
1361
1410
alter table t1 enable keys;
 
1411
Warnings:
 
1412
Note    1031    Table storage engine for 't1' doesn't have this option
1362
1413
show keys from t1;
1363
 
Table   Unique  Key_name        Seq_in_index    Column_name
1364
 
t1      NO      a       1       a
 
1414
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
1415
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
1365
1416
drop table t1;
1366
1417
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1367
1418
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1390
1441
1
1391
1442
DROP TABLE t1;
1392
1443
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
1393
 
show table status like 't1';
1394
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1395
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
1444
SHOW TABLE STATUS LIKE 't1';
 
1445
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
1396
1446
INSERT INTO t1 VALUES (1,1);
1397
 
show table status like 't1';
1398
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1399
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1400
 
ALTER TABLE t1 DISABLE KEYS;
1401
 
show table status like 't1';
1402
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1403
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1404
 
ALTER TABLE t1 ENABLE KEYS;
1405
 
show table status like 't1';
1406
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1407
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1408
 
ALTER TABLE t1 DISABLE KEYS;
1409
 
show table status like 't1';
1410
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1411
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
1412
 
ALTER TABLE t1 ENABLE KEYS;
1413
 
show table status like 't1';
1414
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
1415
 
#       test    t1      TEMPORARY       MyISAM  #       #       #       #       #
 
1447
SHOW TABLE STATUS LIKE 't1';
 
1448
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
 
1449
ALTER TABLE t1 DISABLE KEYS;
 
1450
SHOW TABLE STATUS LIKE 't1';
 
1451
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
 
1452
ALTER TABLE t1 ENABLE KEYS;
 
1453
SHOW TABLE STATUS LIKE 't1';
 
1454
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
 
1455
ALTER TABLE t1 DISABLE KEYS;
 
1456
SHOW TABLE STATUS LIKE 't1';
 
1457
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
 
1458
ALTER TABLE t1 ENABLE KEYS;
 
1459
SHOW TABLE STATUS LIKE 't1';
 
1460
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
1416
1461
# Enable keys with parallel repair
 
1462
SET GLOBAL myisam_repair_threads=2;
1417
1463
ALTER TABLE t1 DISABLE KEYS;
1418
1464
ALTER TABLE t1 ENABLE KEYS;
1419
 
CHECK TABLE t1;
 
1465
SET GLOBAL myisam_repair_threads=1;
 
1466
CHECK TABLE t1 EXTENDED;
1420
1467
Table   Op      Msg_type        Msg_text
1421
1468
test.t1 check   status  OK
1422
1469
DROP TABLE t1;
1436
1483
4       4
1437
1484
DROP TABLE t1, t2;
1438
1485
End of 5.0 tests
 
1486
create temporary table t1 (a int not null, key `a` (a) key_block_size=1024) ENGINE=MyISAM;
 
1487
show create table t1;
 
1488
Table   Create Table
 
1489
t1      CREATE TEMPORARY TABLE `t1` (
 
1490
  `a` int NOT NULL,
 
1491
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024
 
1492
) ENGINE=MyISAM
 
1493
drop table t1;
 
1494
create temporary table t1 (a int not null, key `a` (a) key_block_size=2048) ENGINE=MyISAM;
 
1495
show create table t1;
 
1496
Table   Create Table
 
1497
t1      CREATE TEMPORARY TABLE `t1` (
 
1498
  `a` int NOT NULL,
 
1499
  KEY `a` (`a`) KEY_BLOCK_SIZE=2048
 
1500
) ENGINE=MyISAM
 
1501
drop table t1;
 
1502
create temporary table t1 (a varchar(2048), key `a` (a)) ENGINE=MyISAM;
 
1503
Warnings:
 
1504
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1505
show create table t1;
 
1506
Table   Create Table
 
1507
t1      CREATE TEMPORARY TABLE `t1` (
 
1508
  `a` varchar(2048) DEFAULT NULL,
 
1509
  KEY `a` (`a`(333))
 
1510
) ENGINE=MyISAM
 
1511
drop table t1;
 
1512
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1024) ENGINE=MyISAM;
 
1513
Warnings:
 
1514
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1515
show create table t1;
 
1516
Table   Create Table
 
1517
t1      CREATE TEMPORARY TABLE `t1` (
 
1518
  `a` varchar(2048) DEFAULT NULL,
 
1519
  KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
 
1520
) ENGINE=MyISAM
 
1521
drop table t1;
 
1522
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=1024;
 
1523
Warnings:
 
1524
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1525
show create table t1;
 
1526
Table   Create Table
 
1527
t1      CREATE TEMPORARY TABLE `t1` (
 
1528
  `a` int NOT NULL,
 
1529
  `b` varchar(2048) DEFAULT NULL,
 
1530
  KEY `a` (`a`),
 
1531
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=6144
 
1532
) ENGINE=MyISAM KEY_BLOCK_SIZE=1024
 
1533
alter table t1 key_block_size=2048;
 
1534
show create table t1;
 
1535
Table   Create Table
 
1536
t1      CREATE TEMPORARY TABLE `t1` (
 
1537
  `a` int NOT NULL,
 
1538
  `b` varchar(2048) DEFAULT NULL,
 
1539
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
 
1540
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192
 
1541
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
 
1542
alter table t1 add c int, add key (c);
 
1543
show create table t1;
 
1544
Table   Create Table
 
1545
t1      CREATE TEMPORARY TABLE `t1` (
 
1546
  `a` int NOT NULL,
 
1547
  `b` varchar(2048) DEFAULT NULL,
 
1548
  `c` int DEFAULT NULL,
 
1549
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
 
1550
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
 
1551
  KEY `c` (`c`)
 
1552
) ENGINE=MyISAM KEY_BLOCK_SIZE=2048
 
1553
alter table t1 key_block_size=0;
 
1554
alter table t1 add d int, add key (d);
 
1555
show create table t1;
 
1556
Table   Create Table
 
1557
t1      CREATE TEMPORARY TABLE `t1` (
 
1558
  `a` int NOT NULL,
 
1559
  `b` varchar(2048) DEFAULT NULL,
 
1560
  `c` int DEFAULT NULL,
 
1561
  `d` int DEFAULT NULL,
 
1562
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
 
1563
  KEY `b` (`b`(333)) KEY_BLOCK_SIZE=8192,
 
1564
  KEY `c` (`c`) KEY_BLOCK_SIZE=2048,
 
1565
  KEY `d` (`d`)
 
1566
) ENGINE=MyISAM
 
1567
drop table t1;
 
1568
create temporary table t1 (a int not null, b varchar(2048), key (a), key(b)) ENGINE=MyISAM key_block_size=8192;
 
1569
Warnings:
 
1570
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1571
show create table t1;
 
1572
Table   Create Table
 
1573
t1      CREATE TEMPORARY TABLE `t1` (
 
1574
  `a` int NOT NULL,
 
1575
  `b` varchar(2048) DEFAULT NULL,
 
1576
  KEY `a` (`a`),
 
1577
  KEY `b` (`b`(333))
 
1578
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
 
1579
drop table t1;
 
1580
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;
 
1581
Warnings:
 
1582
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1583
show create table t1;
 
1584
Table   Create Table
 
1585
t1      CREATE TEMPORARY TABLE `t1` (
 
1586
  `a` int NOT NULL,
 
1587
  `b` varchar(2048) DEFAULT NULL,
 
1588
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
 
1589
  KEY `b` (`b`(333))
 
1590
) ENGINE=MyISAM KEY_BLOCK_SIZE=8192
 
1591
drop table t1;
 
1592
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;
 
1593
show create table t1;
 
1594
Table   Create Table
 
1595
t1      CREATE TEMPORARY TABLE `t1` (
 
1596
  `a` int NOT NULL,
 
1597
  `b` int DEFAULT NULL,
 
1598
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024,
 
1599
  KEY `b` (`b`) KEY_BLOCK_SIZE=8192
 
1600
) ENGINE=MyISAM KEY_BLOCK_SIZE=16384
 
1601
drop table t1;
 
1602
create temporary table t1 (a int not null, key `a` (a) key_block_size=512) ENGINE=MyISAM;
 
1603
show create table t1;
 
1604
Table   Create Table
 
1605
t1      CREATE TEMPORARY TABLE `t1` (
 
1606
  `a` int NOT NULL,
 
1607
  KEY `a` (`a`) KEY_BLOCK_SIZE=1024
 
1608
) ENGINE=MyISAM
 
1609
drop table t1;
 
1610
create temporary table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000) ENGINE=MyISAM;
 
1611
Warnings:
 
1612
Warning 1071    Specified key was too long; max key length is 1332 bytes
 
1613
show create table t1;
 
1614
Table   Create Table
 
1615
t1      CREATE TEMPORARY TABLE `t1` (
 
1616
  `a` varchar(2048) DEFAULT NULL,
 
1617
  KEY `a` (`a`(333)) KEY_BLOCK_SIZE=6144
 
1618
) ENGINE=MyISAM
 
1619
drop table t1;
 
1620
create temporary table t1 (a int not null, key `a` (a) key_block_size=1025) ENGINE=MyISAM;
 
1621
show create table t1;
 
1622
Table   Create Table
 
1623
t1      CREATE TEMPORARY TABLE `t1` (
 
1624
  `a` int NOT NULL,
 
1625
  KEY `a` (`a`) KEY_BLOCK_SIZE=2048
 
1626
) ENGINE=MyISAM
 
1627
drop table t1;
 
1628
create temporary table t1 (a int not null, key key_block_size=1024 (a)) ENGINE=MyISAM;
 
1629
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
 
1630
create temporary table t1 (a int not null, key `a` key_block_size=1024 (a)) ENGINE=MyISAM;
 
1631
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
1439
1632
CREATE temporary TABLE t1 (
1440
1633
c1 INT,
1441
1634
c2 VARCHAR(300),
1508
1701
SELECT COUNT(*) FROM t1;
1509
1702
COUNT(*)
1510
1703
1
1511
 
CHECK TABLE t1;
 
1704
CHECK TABLE t1 EXTENDED;
1512
1705
Table   Op      Msg_type        Msg_text
1513
1706
test.t1 check   status  OK
1514
1707
SELECT COUNT(*) FROM t1;
1515
1708
COUNT(*)
1516
1709
1
1517
 
CHECK TABLE t1;
 
1710
CHECK TABLE t1 EXTENDED;
1518
1711
Table   Op      Msg_type        Msg_text
1519
1712
test.t1 check   status  OK
1520
1713
DROP TABLE t1;
1529
1722
SELECT COUNT(*) FROM t1;
1530
1723
COUNT(*)
1531
1724
2
1532
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1725
OPTIMIZE TABLE t1;
 
1726
Table   Op      Msg_type        Msg_text
 
1727
test.t1 optimize        status  OK
1533
1728
SELECT COUNT(*) FROM t1;
1534
1729
COUNT(*)
1535
1730
2
1551
1746
CHECK TABLE t1;
1552
1747
Table   Op      Msg_type        Msg_text
1553
1748
test.t1 check   status  OK
1554
 
CHECK TABLE t1;
1555
 
Table   Op      Msg_type        Msg_text
1556
 
test.t1 check   status  OK
1557
 
DROP TABLE t1;
1558
 
CREATE temporary TABLE t1 (
1559
 
c1 CHAR(50),
1560
 
c2 VARCHAR(1)
1561
 
) ENGINE=MyISAM;
1562
 
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1563
 
SELECT COUNT(*) FROM t1;
1564
 
COUNT(*)
1565
 
1
1566
 
CHECK TABLE t1;
1567
 
Table   Op      Msg_type        Msg_text
1568
 
test.t1 check   status  OK
1569
 
SELECT COUNT(*) FROM t1;
1570
 
COUNT(*)
1571
 
1
1572
 
CHECK TABLE t1;
1573
 
Table   Op      Msg_type        Msg_text
1574
 
test.t1 check   status  OK
1575
 
DROP TABLE t1;
1576
 
CREATE temporary TABLE t1 (
1577
 
c1 CHAR(50),
1578
 
c2 VARCHAR(1)
1579
 
) ENGINE=MyISAM;
1580
 
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
1581
 
SELECT COUNT(*) FROM t1;
1582
 
COUNT(*)
1583
 
1
1584
 
CHECK TABLE t1;
1585
 
Table   Op      Msg_type        Msg_text
1586
 
test.t1 check   status  OK
1587
 
SELECT COUNT(*) FROM t1;
1588
 
COUNT(*)
1589
 
1
1590
 
CHECK TABLE t1;
 
1749
CHECK TABLE t1 EXTENDED;
 
1750
Table   Op      Msg_type        Msg_text
 
1751
test.t1 check   status  OK
 
1752
DROP TABLE t1;
 
1753
CREATE temporary TABLE t1 (
 
1754
c1 CHAR(50),
 
1755
c2 VARCHAR(1)
 
1756
) ENGINE=MyISAM;
 
1757
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
 
1758
SELECT COUNT(*) FROM t1;
 
1759
COUNT(*)
 
1760
1
 
1761
CHECK TABLE t1;
 
1762
Table   Op      Msg_type        Msg_text
 
1763
test.t1 check   status  OK
 
1764
SELECT COUNT(*) FROM t1;
 
1765
COUNT(*)
 
1766
1
 
1767
CHECK TABLE t1;
 
1768
Table   Op      Msg_type        Msg_text
 
1769
test.t1 check   status  OK
 
1770
DROP TABLE t1;
 
1771
CREATE temporary TABLE t1 (
 
1772
c1 CHAR(50),
 
1773
c2 VARCHAR(1)
 
1774
) ENGINE=MyISAM;
 
1775
INSERT INTO t1 VALUES(REPEAT( x'e0ae85',43), 'b');
 
1776
SELECT COUNT(*) FROM t1;
 
1777
COUNT(*)
 
1778
1
 
1779
CHECK TABLE t1 EXTENDED;
 
1780
Table   Op      Msg_type        Msg_text
 
1781
test.t1 check   status  OK
 
1782
SELECT COUNT(*) FROM t1;
 
1783
COUNT(*)
 
1784
1
 
1785
CHECK TABLE t1 EXTENDED;
1591
1786
Table   Op      Msg_type        Msg_text
1592
1787
test.t1 check   status  OK
1593
1788
DROP TABLE t1;
1602
1797
SELECT COUNT(*) FROM t1;
1603
1798
COUNT(*)
1604
1799
2
1605
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1800
OPTIMIZE TABLE t1;
 
1801
Table   Op      Msg_type        Msg_text
 
1802
test.t1 optimize        status  OK
1606
1803
SELECT COUNT(*) FROM t1;
1607
1804
COUNT(*)
1608
1805
2
1624
1821
CHECK TABLE t1;
1625
1822
Table   Op      Msg_type        Msg_text
1626
1823
test.t1 check   status  OK
1627
 
CHECK TABLE t1;
 
1824
CHECK TABLE t1 EXTENDED;
1628
1825
Table   Op      Msg_type        Msg_text
1629
1826
test.t1 check   status  OK
1630
1827
DROP TABLE t1;