~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/negation_elimination.result

  • Committer: Brian Aker
  • Date: 2009-02-10 00:14:40 UTC
  • Revision ID: brian@tangent.org-20090210001440-qjg8eofh3h93064b
Adding Multi-threaded Scheduler into the system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
19
29
29
explain select * from t1 where not(not(not(a > 10)));
30
30
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
31
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
31
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
32
32
select * from t1 where not(not(not(a > 10)));
33
33
a
34
34
0
79
79
19
80
80
explain select * from t1 where not(a != 10);
81
81
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
82
 
1       SIMPLE  t1      ref     a       a       5       const   1       Using where; Using index
 
82
1       SIMPLE  t1      ref     a       a       5       const   1       Using index
83
83
select * from t1 where not(a != 1);
84
84
a
85
85
1
115
115
9
116
116
explain select * from t1 where not(a > 10);
117
117
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
118
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
118
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
119
119
select * from t1 where not(a > 10);
120
120
a
121
121
0
145
145
19
146
146
explain select * from t1 where not(a is null);
147
147
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
148
 
1       SIMPLE  t1      range   a       a       5       NULL    20      Using where; Using index
 
148
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
149
149
select * from t1 where not(a is null);
150
150
a
151
151
0
176
176
NULL
177
177
explain select * from t1 where not(a < 5 or a > 15);
178
178
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
179
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
179
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
180
180
select * from t1 where not(a < 5 or a > 15);
181
181
a
182
182
5
255
255
19
256
256
explain select * from t1 where a = 2 or not(a < 5 or a > 15);
257
257
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
258
 
1       SIMPLE  t1      range   a       a       5       NULL    12      Using where; Using index
 
258
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
259
259
select * from t1 where a = 2 or not(a < 5 or a > 15);
260
260
a
261
261
2
342
342
19
343
343
explain select * from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17));
344
344
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
345
 
1       SIMPLE  t1      range   a       a       5       NULL    15      Using where; Using index
 
345
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
346
346
select * from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17));
347
347
a
348
348
5
362
362
19
363
363
explain select * from t1 where ((a between 5 and 15) and (not(a like 10)));
364
364
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
365
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
365
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
366
366
select * from t1 where ((a between 5 and 15) and (not(a like 10)));
367
367
a
368
368
5
385
385
3       1
386
386
explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
387
387
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
388
 
1       SIMPLE  t1      index   NULL    a       5       NULL    #       100.00  Using where; Using index
 
388
1       SIMPLE  t1      index   NULL    a       5       NULL    21      100.00  Using where; Using index
389
389
Warnings:
390
390
Note    1003    select `test`.`t1`.`a` AS `a`,(`test`.`t1`.`a` <> 0) AS `not(not(a))`,((`test`.`t1`.`a` > 2) or `test`.`t1`.`a`) AS `not(a <= 2 and not(a))`,(`test`.`t1`.`a` like '1') AS `not(a not like "1")`,(`test`.`t1`.`a` in (1,2)) AS `not (a not in (1,2))`,(`test`.`t1`.`a` = 2) AS `not(a != 2)` from `test`.`t1` where `test`.`t1`.`a` having `test`.`t1`.`a`
391
391
drop table t1;