~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/negation_elimination.result

Merge Revision revid:marko.makela@oracle.com-20100505101406-u4low2x26q6itck0 from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100505101406-u4low2x26q6itck0

Original Authors: Marko Mäkelä <marko.makela@oracle.com>
Original commit message:
Merge from mysql-5.1-innodb:

  ------------------------------------------------------------
  revno: 3446
  revision-id: marko.makela@oracle.com-20100505100507-6kcd2hf32hruxbv7
  parent: marko.makela@oracle.com-20100505095328-vetnl0flhmhao7p5
  committer: Marko Mäkelä <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-05-05 13:05:07 +0300
  message:
    Add Valgrind diagnostics to track down Bug #38999.
  ------------------------------------------------------------

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
10
45
45
explain select * from t1 where not(not(not(a < 5) and not(a > 10)));
46
46
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
47
 
1       SIMPLE  t1      range   a       a       5       NULL    5       Using where; Using index
 
47
1       SIMPLE  t1      range   a       a       5       NULL    6       Using where; Using index
48
48
select * from t1 where not(not(not(a < 5) and not(a > 10)));
49
49
a
50
50
5
55
55
10
56
56
explain select * from t1 where not(a = 10);
57
57
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
58
 
1       SIMPLE  t1      range   a       a       5       NULL    19      Using where; Using index
 
58
1       SIMPLE  t1      range   a       a       5       NULL    18      Using where; Using index
59
59
select * from t1 where not(a = 10);
60
60
a
61
61
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 index
 
82
1       SIMPLE  t1      ref     a       a       5       const   1       Using where; Using index
83
83
select * from t1 where not(a != 1);
84
84
a
85
85
1
86
86
explain select * from t1 where not(a < 10);
87
87
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
88
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
88
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
89
89
select * from t1 where not(a < 10);
90
90
a
91
91
10
131
131
10
132
132
explain select * from t1 where not(a <= 10);
133
133
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
134
 
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
 
134
1       SIMPLE  t1      range   a       a       5       NULL    9       Using where; Using index
135
135
select * from t1 where not(a <= 10);
136
136
a
137
137
11
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
192
192
15
193
193
explain select * from t1 where not(a < 15 and a > 5);
194
194
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
195
 
1       SIMPLE  t1      range   a       a       5       NULL    12      Using where; Using index
 
195
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
196
196
select * from t1 where not(a < 15 and a > 5);
197
197
a
198
198
0
208
208
19
209
209
explain select * from t1 where a = 2 or not(a < 10);
210
210
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
211
 
1       SIMPLE  t1      range   a       a       5       NULL    12      Using where; Using index
 
211
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
212
212
select * from t1 where a = 2 or not(a < 10);
213
213
a
214
214
2
224
224
19
225
225
explain select * from t1 where a > 5 and not(a > 10);
226
226
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
227
 
1       SIMPLE  t1      range   a       a       5       NULL    4       Using where; Using index
 
227
1       SIMPLE  t1      range   a       a       5       NULL    5       Using where; Using index
228
228
select * from t1 where a > 5 and not(a > 10);
229
229
a
230
230
6
272
272
15
273
273
explain select * from t1 where a = 7 or not(a < 15 and a > 5);
274
274
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
275
 
1       SIMPLE  t1      range   a       a       5       NULL    13      Using where; Using index
 
275
1       SIMPLE  t1      range   a       a       5       NULL    12      Using where; Using index
276
276
select * from t1 where a = 7 or not(a < 15 and a > 5);
277
277
a
278
278
0
289
289
19
290
290
explain select * from t1 where NULL or not(a < 15 and a > 5);
291
291
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
292
 
1       SIMPLE  t1      range   a       a       5       NULL    12      Using where; Using index
 
292
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
293
293
select * from t1 where NULL or not(a < 15 and a > 5);
294
294
a
295
295
0
327
327
0
328
328
explain select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
329
329
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
330
 
1       SIMPLE  t1      range   a       a       5       NULL    11      Using where; Using index
 
330
1       SIMPLE  t1      range   a       a       5       NULL    10      Using where; Using index
331
331
select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
332
332
a
333
333
10
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
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    5       100.00  Using where; Using index
 
388
1       SIMPLE  t1      index   NULL    a       5       NULL    #       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;