~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Padraig O'Sullivan
  • Date: 2010-03-15 14:05:26 UTC
  • mfrom: (1237.9.99 staging)
  • Revision ID: osullivan.padraig@gmail.com-20100315140526-opbgwdwn6tfecdkq
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
insert into t1 (b) values (1),(2),(2),(2),(2);
28
28
alter table t1 engine=MYISAM;
29
29
show index from t1;
30
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
31
 
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
32
 
t1      1       b       1       b       A       NULL    NULL    NULL            BTREE           
 
30
Table   Unique  Key_name        Seq_in_index    Column_name
 
31
t1      TRUE    PRIMARY 1       a
 
32
t1      FALSE   b       1       b
33
33
alter table t1 engine=MyISAM;
34
34
show index from t1;
35
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
36
 
t1      0       PRIMARY 1       a       A       5       NULL    NULL            BTREE           
37
 
t1      1       b       1       b       A       NULL    NULL    NULL            BTREE           
 
35
Table   Unique  Key_name        Seq_in_index    Column_name
 
36
t1      TRUE    PRIMARY 1       a
 
37
t1      FALSE   b       1       b
38
38
drop table t1;
39
39
create temporary table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
40
40
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
308
308
INSERT into t2 values (1,1,1), (2,2,2);
309
309
alter table t1 ENGINE=MYISAM;
310
310
show index from t1;
311
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
312
 
t1      1       b       1       b       A       NULL    NULL    NULL    YES     BTREE           
313
 
t1      1       c       1       c       A       NULL    NULL    NULL    YES     BTREE           
314
 
t1      1       a       1       a       A       NULL    NULL    NULL            BTREE           
315
 
t1      1       a       2       b       A       NULL    NULL    NULL    YES     BTREE           
316
 
t1      1       c_2     1       c       A       NULL    NULL    NULL    YES     BTREE           
317
 
t1      1       c_2     2       a       A       NULL    NULL    NULL            BTREE           
 
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
318
318
explain select * from t1,t2 where t1.a=t2.a;
319
319
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
320
320
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
490
490
insert t2 select * from t1;
491
491
checksum table t1, t2, t3;
492
492
Table   Checksum
493
 
test.t1 2948697075
494
 
test.t2 2948697075
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 2948697075
501
 
test.t2 2948697075
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 2948697075
508
 
test.t2 2948697075
509
 
test.t3 NULL
510
 
Warnings:
511
 
Error   1146    Table 'test.t3' doesn't exist
 
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  #       #       #       #       #
512
516
drop table t1,t2;
513
517
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
514
518
insert into t1 values (null,''), (null,'');
631
635
8
632
636
9
633
637
DELETE FROM t1 WHERE _id < 8;
634
 
SHOW TABLE STATUS LIKE 't1';
635
 
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
 
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  #       #       #       #       #
636
641
CHECK TABLE t1;
637
642
Table   Op      Msg_type        Msg_text
638
643
test.t1 check   status  OK
640
645
CHECK TABLE t1;
641
646
Table   Op      Msg_type        Msg_text
642
647
test.t1 check   status  OK
643
 
SHOW TABLE STATUS LIKE 't1';
644
 
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
 
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  #       #       #       #       #
645
651
SELECT _id FROM t1;
646
652
_id
647
653
8
652
658
Variable_name   Value
653
659
myisam_repair_threads   1
654
660
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM;
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
 
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  #       #       #       #       #
657
664
DROP TABLE t1;
658
665
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
659
666
INSERT INTO t1 VALUES
1390
1397
Table   Op      Msg_type        Msg_text
1391
1398
test.t1 analyze status  OK
1392
1399
show keys from t1;
1393
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
1394
 
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
 
1400
Table   Unique  Key_name        Seq_in_index    Column_name
 
1401
t1      FALSE   a       1       a
1395
1402
alter table t1 disable keys;
1396
1403
Warnings:
1397
1404
Note    1031    Table storage engine for 't1' doesn't have this option
1399
1406
Warnings:
1400
1407
Note    1031    Table storage engine for 't1' doesn't have this option
1401
1408
show keys from t1;
1402
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
1403
 
t1      1       a       1       a       A       8       NULL    NULL    YES     BTREE           
 
1409
Table   Unique  Key_name        Seq_in_index    Column_name
 
1410
t1      FALSE   a       1       a
1404
1411
drop table t1;
1405
1412
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1406
1413
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1429
1436
1
1430
1437
DROP TABLE t1;
1431
1438
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
1432
 
SHOW TABLE STATUS LIKE 't1';
1433
 
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
 
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  #       #       #       #       #
1434
1442
INSERT INTO t1 VALUES (1,1);
1435
 
SHOW TABLE STATUS LIKE 't1';
1436
 
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
1437
 
ALTER TABLE t1 DISABLE KEYS;
1438
 
SHOW TABLE STATUS LIKE 't1';
1439
 
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
1440
 
ALTER TABLE t1 ENABLE KEYS;
1441
 
SHOW TABLE STATUS LIKE 't1';
1442
 
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
1443
 
ALTER TABLE t1 DISABLE KEYS;
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
1446
 
ALTER TABLE t1 ENABLE KEYS;
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
 
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  #       #       #       #       #
1449
1462
# Enable keys with parallel repair
1450
1463
SET GLOBAL myisam_repair_threads=2;
1451
1464
ALTER TABLE t1 DISABLE KEYS;