~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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      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
 
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
306
314
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
307
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        note    The storage engine for the table doesn't support optimize
310
320
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
 
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       NULL    NULL    NULL    YES     BTREE           
 
323
t1      1       c       1       c       A       NULL    NULL    NULL    YES     BTREE           
 
324
t1      1       a       1       a       A       NULL    NULL    NULL            BTREE           
 
325
t1      1       a       2       b       A       NULL    NULL    NULL    YES     BTREE           
 
326
t1      1       c_2     1       c       A       NULL    NULL    NULL    YES     BTREE           
 
327
t1      1       c_2     2       a       A       NULL    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       
488
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
 
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  #       #       #       #       #
 
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
516
522
drop table t1,t2;
517
523
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
518
524
insert into t1 values (null,''), (null,'');
635
641
8
636
642
9
637
643
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  #       #       #       #       #
 
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        note    The storage engine for the table doesn't support optimize
 
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
651
657
SELECT _id FROM t1;
652
658
_id
653
659
8
658
664
Variable_name   Value
659
665
myisam_repair_threads   1
660
666
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  #       #       #       #       #
 
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
664
669
DROP TABLE t1;
665
670
CREATE TEMPORARY TABLE t1 (c1 TEXT NOT NULL, KEY c1 (c1(10))) ENGINE=MyISAM;
666
671
INSERT INTO t1 VALUES
1360
1365
  `v` varchar(10) DEFAULT NULL
1361
1366
) ENGINE=MyISAM
1362
1367
drop table t1;
1363
 
create TEMPORARY table t1 (v varchar(10), c char(10));
 
1368
create TEMPORARY table t1 (v varchar(10), c char(10)) row_format=fixed;
1364
1369
show create table t1;
1365
1370
Table   Create Table
1366
1371
t1      CREATE TEMPORARY TABLE `t1` (
1367
1372
  `v` varchar(10) DEFAULT NULL,
1368
1373
  `c` varchar(10) DEFAULT NULL
1369
 
) ENGINE=MyISAM
 
1374
) ENGINE=MyISAM ROW_FORMAT=FIXED
1370
1375
insert into t1 values('a','a'),('a ','a ');
1371
1376
select concat('*',v,'*',c,'*') from t1;
1372
1377
concat('*',v,'*',c,'*')
1397
1402
Table   Op      Msg_type        Msg_text
1398
1403
test.t1 analyze status  OK
1399
1404
show keys from t1;
1400
 
Table   Unique  Key_name        Seq_in_index    Column_name
1401
 
t1      FALSE   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           
1402
1407
alter table t1 disable keys;
1403
1408
Warnings:
1404
1409
Note    1031    Table storage engine for 't1' doesn't have this option
1406
1411
Warnings:
1407
1412
Note    1031    Table storage engine for 't1' doesn't have this option
1408
1413
show keys from t1;
1409
 
Table   Unique  Key_name        Seq_in_index    Column_name
1410
 
t1      FALSE   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           
1411
1416
drop table t1;
1412
1417
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1413
1418
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
1436
1441
1
1437
1442
DROP TABLE t1;
1438
1443
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  #       #       #       #       #
 
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
1442
1446
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  #       #       #       #       #
 
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
1462
1461
# Enable keys with parallel repair
1463
1462
SET GLOBAL myisam_repair_threads=2;
1464
1463
ALTER TABLE t1 DISABLE KEYS;
1465
1464
ALTER TABLE t1 ENABLE KEYS;
1466
1465
SET GLOBAL myisam_repair_threads=1;
1467
 
CHECK TABLE t1;
 
1466
CHECK TABLE t1 EXTENDED;
1468
1467
Table   Op      Msg_type        Msg_text
1469
1468
test.t1 check   status  OK
1470
1469
DROP TABLE t1;
1702
1701
SELECT COUNT(*) FROM t1;
1703
1702
COUNT(*)
1704
1703
1
1705
 
CHECK TABLE t1;
 
1704
CHECK TABLE t1 EXTENDED;
1706
1705
Table   Op      Msg_type        Msg_text
1707
1706
test.t1 check   status  OK
1708
1707
SELECT COUNT(*) FROM t1;
1709
1708
COUNT(*)
1710
1709
1
1711
 
CHECK TABLE t1;
 
1710
CHECK TABLE t1 EXTENDED;
1712
1711
Table   Op      Msg_type        Msg_text
1713
1712
test.t1 check   status  OK
1714
1713
DROP TABLE t1;
1723
1722
SELECT COUNT(*) FROM t1;
1724
1723
COUNT(*)
1725
1724
2
1726
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1725
OPTIMIZE TABLE t1;
 
1726
Table   Op      Msg_type        Msg_text
 
1727
test.t1 optimize        note    The storage engine for the table doesn't support optimize
1727
1728
SELECT COUNT(*) FROM t1;
1728
1729
COUNT(*)
1729
1730
2
1745
1746
CHECK TABLE t1;
1746
1747
Table   Op      Msg_type        Msg_text
1747
1748
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;
 
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;
1785
1786
Table   Op      Msg_type        Msg_text
1786
1787
test.t1 check   status  OK
1787
1788
DROP TABLE t1;
1796
1797
SELECT COUNT(*) FROM t1;
1797
1798
COUNT(*)
1798
1799
2
1799
 
ALTER TABLE t1 ENGINE=MyISAM;
 
1800
OPTIMIZE TABLE t1;
 
1801
Table   Op      Msg_type        Msg_text
 
1802
test.t1 optimize        note    The storage engine for the table doesn't support optimize
1800
1803
SELECT COUNT(*) FROM t1;
1801
1804
COUNT(*)
1802
1805
2
1818
1821
CHECK TABLE t1;
1819
1822
Table   Op      Msg_type        Msg_text
1820
1823
test.t1 check   status  OK
1821
 
CHECK TABLE t1;
 
1824
CHECK TABLE t1 EXTENDED;
1822
1825
Table   Op      Msg_type        Msg_text
1823
1826
test.t1 check   status  OK
1824
1827
DROP TABLE t1;