~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/innodb_mrr.result

Fixed patch application so that the silly thing compiles. :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
create table t1(a int);
5
5
show create table t1;
6
6
Table   Create Table
7
 
t1      CREATE TABLE `t1` (
8
 
  `a` int
9
 
) ENGINE=InnoDB
 
7
t1      CREATE TABLE "t1" (
 
8
  "a" int(11)
 
9
) ENGINE=InnoDB DEFAULT CHARSET=latin1
10
10
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
11
11
create table t2(a int);
12
12
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
183
183
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
184
184
                                                      or c='no-such-row2');
185
185
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
186
 
1       SIMPLE  t4      range   idx1    idx1    91      NULL    16      Using where; Using MRR
 
186
1       SIMPLE  t4      range   idx1    idx1    29      NULL    16      Using index condition; Using MRR
187
187
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
188
188
                                                    or c='no-such-row2');
189
189
a       b       c       filler
205
205
explain 
206
206
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
207
207
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
208
 
1       SIMPLE  t4      ALL     idx1    NULL    NULL    NULL    178     Using where
 
208
1       SIMPLE  t4      range   idx1    idx1    29      NULL    32      Using index condition; Using MRR
209
209
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
210
210
a       b       c       filler
211
211
b-1     NULL    c-1     NULL-15
286
286
explain
287
287
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
288
288
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
289
 
1       SIMPLE  t2      range   a       a       35      NULL    99      Using where; Using MRR
 
289
1       SIMPLE  t2      range   a       a       9       NULL    99      Using index condition; Using MRR
290
290
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
291
291
count(length(a) + length(filler))
292
 
0
 
292
100
293
293
drop table t2;
294
294
create table t2 (a char(100), b char(100), c char(100), d int, 
295
295
filler char(10), key(d), primary key (a,b,c)) engine= innodb;
296
296
insert into t2 select A.a, B.a, B.a, A.a, 'filler' from t1 A, t1 B;
297
297
explain select * from t2 force index (d) where d < 10;
298
298
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
299
 
1       SIMPLE  t2      range   d       d       5       NULL    50      Using where; Using MRR
 
299
1       SIMPLE  t2      range   d       d       5       NULL    47      Using index condition; Using MRR
300
300
drop table t2;
301
301
drop table t1;
302
302
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;