~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Brian Aker
  • Date: 2010-02-25 07:54:52 UTC
  • mfrom: (1273.13.101 build)
  • Revision ID: brian@gaz-20100225075452-19eozreshbrerypu
Merge of all patches in build.

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   Key_name        Seq_in_index    Column_name
 
31
t1      PRIMARY 0       a
 
32
t1      b       0       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   Key_name        Seq_in_index    Column_name
 
36
t1      PRIMARY 0       a
 
37
t1      b       0       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   Key_name        Seq_in_index    Column_name
 
312
t1      b       0       b
 
313
t1      c       0       c
 
314
t1      a       0       a
 
315
t1      a       1       b
 
316
t1      c_2     0       c
 
317
t1      c_2     1       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       
509
509
test.t3 NULL
510
510
Warnings:
511
511
Error   1146    Table 'test.t3' doesn't exist
 
512
show table status;
 
513
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
 
514
t1      InnoDB  0       DEFAULT 0       0       0       0       0       0       0       0       0       0       utf8_general_ci 0               
 
515
t2      InnoDB  0       DEFAULT 0       0       0       0       0       0       0       0       0       0       utf8_general_ci 0               
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,'');
633
637
DELETE FROM t1 WHERE _id < 8;
634
638
SHOW TABLE STATUS LIKE 't1';
635
639
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
 
640
t1      MyISAM  0       DEFAULT 0       #       #       #       #       0       #       #       #       #       #       #               
636
641
CHECK TABLE t1;
637
642
Table   Op      Msg_type        Msg_text
638
643
test.t1 check   status  OK
642
647
test.t1 check   status  OK
643
648
SHOW TABLE STATUS LIKE 't1';
644
649
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
 
650
t1      MyISAM  0       DEFAULT 0       #       #       #       #       0       #       #       #       #       #       #               
645
651
SELECT _id FROM t1;
646
652
_id
647
653
8
654
660
CREATE TEMPORARY TABLE t1 (c1 TEXT) ENGINE=MyISAM;
655
661
SHOW TABLE STATUS LIKE 't1';
656
662
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
 
663
t1      MyISAM  0       DEFAULT X       X       X       0       X       X       X       X       X       X       utf8_general_ci X               
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   Key_name        Seq_in_index    Column_name
 
1401
t1      a       0       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   Key_name        Seq_in_index    Column_name
 
1410
t1      a       0       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);
1431
1438
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT, UNIQUE INDEX (c1), INDEX (c2)) ENGINE=MYISAM;
1432
1439
SHOW TABLE STATUS LIKE 't1';
1433
1440
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
 
1441
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
1434
1442
INSERT INTO t1 VALUES (1,1);
1435
1443
SHOW TABLE STATUS LIKE 't1';
1436
1444
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
 
1445
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
 
1446
ALTER TABLE t1 DISABLE 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
 
1449
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
 
1450
ALTER TABLE t1 ENABLE KEYS;
 
1451
SHOW TABLE STATUS LIKE 't1';
 
1452
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
 
1453
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
 
1454
ALTER TABLE t1 DISABLE KEYS;
 
1455
SHOW TABLE STATUS LIKE 't1';
 
1456
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
 
1457
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
 
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
 
1461
t1      MyISAM  0       DEFAULT 0       #       #       #       0       #       #       #       #       #       #       #               
1449
1462
# Enable keys with parallel repair
1450
1463
SET GLOBAL myisam_repair_threads=2;
1451
1464
ALTER TABLE t1 DISABLE KEYS;