~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/null_key.result

  • Committer: Patrick Crews
  • Date: 2010-08-09 16:31:29 UTC
  • mto: (1711.1.21 build)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: gleebix@gmail.com-20100809163129-jh0jlwejpuefjrok
Updated test results with changes due to optimizer bug fix.  EXPLAIN output now includes 'Using where' for several queries that didn't previously have this output

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
1       SIMPLE  t1      range   a,b     a       9       NULL    3       Using where; Using index
22
22
explain select * from t1 where (a is null or a = 7) and b=7;
23
23
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
24
 
1       SIMPLE  t1      ref_or_null     a,b     a       9       const,const     2       Using index
 
24
1       SIMPLE  t1      ref_or_null     a,b     a       9       const,const     2       Using where; Using index
25
25
explain select * from t1 where (a is null or a = 7) and b=7 order by a;
26
26
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
27
 
1       SIMPLE  t1      ref_or_null     a,b     a       9       const,const     2       Using index; Using filesort
 
27
1       SIMPLE  t1      ref_or_null     a,b     a       9       const,const     2       Using where; Using index; Using filesort
28
28
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
29
29
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
30
30
1       SIMPLE  t1      ref     a,b     a       5       const   3       Using where; Using index
162
162
insert into t1 values (7,null), (8,null), (8,7);
163
163
explain select * from t1 where a = 7 and (b=7 or b is null);
164
164
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
165
 
1       SIMPLE  t1      ref_or_null     a,b     a       10      const,const     2       Using index
 
165
1       SIMPLE  t1      ref_or_null     a,b     a       10      const,const     2       Using where; Using index
166
166
select * from t1 where a = 7 and (b=7 or b is null);
167
167
a       b
168
168
7       NULL
174
174
7       NULL
175
175
explain select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
176
176
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
177
 
1       SIMPLE  t1      ref_or_null     a       a       5       const   2       Using index
 
177
1       SIMPLE  t1      ref_or_null     a       a       5       const   2       Using where; Using index
178
178
select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
179
179
a       b
180
180
7       NULL
196
196
explain select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
197
197
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
198
198
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    X       
199
 
1       SIMPLE  t1      ref_or_null     a       a       10      test.t2.a,const X       Using index
 
199
1       SIMPLE  t1      ref_or_null     a       a       10      test.t2.a,const X       Using where; Using index
200
200
select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
201
201
a       a       b
202
202
7       7       NULL
205
205
explain select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
206
206
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
207
207
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    X       
208
 
1       SIMPLE  t1      ref_or_null     a       a       10      test.t2.a,const X       Using index
 
208
1       SIMPLE  t1      ref_or_null     a       a       10      test.t2.a,const X       Using where; Using index
209
209
select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
210
210
a       a       b
211
211
8       8       7