~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Brian Aker
  • Date: 2010-02-19 01:53:48 UTC
  • mto: (1273.13.97 build)
  • mto: This revision was merged to the branch mainline in revision 1309.
  • Revision ID: brian@gaz-20100219015348-t1dv74unmbje8ndj
First pass through show indexs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
create TEMPORARY table t1 (a int not null auto_increment, b int not null, primary key (a), index(b)) ENGINE=MYISAM;
27
27
insert into t1 (b) values (1),(2),(2),(2),(2);
28
28
alter table t1 engine=MYISAM;
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           
33
29
alter table t1 engine=MyISAM;
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           
38
30
drop table t1;
39
31
create temporary table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=myisam;
40
32
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
307
299
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
308
300
INSERT into t2 values (1,1,1), (2,2,2);
309
301
alter table t1 ENGINE=MYISAM;
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           
318
302
explain select * from t1,t2 where t1.a=t2.a;
319
303
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
320
304
1       SIMPLE  t2      ALL     a       NULL    NULL    NULL    2       
1390
1374
Table   Op      Msg_type        Msg_text
1391
1375
test.t1 analyze status  OK
1392
1376
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           
 
1377
Table   Key_name        Seq_in_index    Column_name
 
1378
t1      a       0       a
1395
1379
alter table t1 disable keys;
1396
1380
Warnings:
1397
1381
Note    1031    Table storage engine for 't1' doesn't have this option
1399
1383
Warnings:
1400
1384
Note    1031    Table storage engine for 't1' doesn't have this option
1401
1385
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           
 
1386
Table   Key_name        Seq_in_index    Column_name
 
1387
t1      a       0       a
1404
1388
drop table t1;
1405
1389
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1406
1390
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);