~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/myisam.result

  • Committer: Brian Aker
  • Date: 2010-03-01 22:24:10 UTC
  • mto: (1309.2.12 build)
  • mto: This revision was merged to the branch mainline in revision 1317.
  • Revision ID: brian@gaz-20100301222410-w509prhp73pg6z4n
Update the code so use a faster index lookup method.

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   Key_name        Seq_in_index    Column_name
31
 
t1      PRIMARY 0       a
32
 
t1      b       0       b
 
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   Key_name        Seq_in_index    Column_name
36
 
t1      PRIMARY 0       a
37
 
t1      b       0       b
 
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   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
 
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       
1397
1397
Table   Op      Msg_type        Msg_text
1398
1398
test.t1 analyze status  OK
1399
1399
show keys from t1;
1400
 
Table   Key_name        Seq_in_index    Column_name
1401
 
t1      a       0       a
 
1400
Table   Unique  Key_name        Seq_in_index    Column_name
 
1401
t1      FALSE   a       1       a
1402
1402
alter table t1 disable keys;
1403
1403
Warnings:
1404
1404
Note    1031    Table storage engine for 't1' doesn't have this option
1406
1406
Warnings:
1407
1407
Note    1031    Table storage engine for 't1' doesn't have this option
1408
1408
show keys from t1;
1409
 
Table   Key_name        Seq_in_index    Column_name
1410
 
t1      a       0       a
 
1409
Table   Unique  Key_name        Seq_in_index    Column_name
 
1410
t1      FALSE   a       1       a
1411
1411
drop table t1;
1412
1412
CREATE TEMPORARY TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
1413
1413
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);