OLD | NEW |
1 # 2007 July 17 | 1 # 2007 July 17 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 # Ticket #658: Test the min()/max() optimization when the FROM clause | 282 # Ticket #658: Test the min()/max() optimization when the FROM clause |
283 # is a subquery. | 283 # is a subquery. |
284 # | 284 # |
285 ifcapable {compound && subquery} { | 285 ifcapable {compound && subquery} { |
286 do_test minmax2-9.1 { | 286 do_test minmax2-9.1 { |
287 execsql { | 287 execsql { |
288 SELECT max(rowid) FROM ( | 288 SELECT max(rowid) FROM ( |
289 SELECT max(rowid) FROM t4 UNION SELECT max(rowid) FROM t5 | 289 SELECT max(rowid) FROM t4 UNION SELECT max(rowid) FROM t5 |
290 ) | 290 ) |
291 } | 291 } |
292 } {1} | 292 } {{}} |
293 do_test minmax2-9.2 { | 293 do_test minmax2-9.2 { |
294 execsql { | 294 execsql { |
295 SELECT max(rowid) FROM ( | 295 SELECT max(rowid) FROM ( |
296 SELECT max(rowid) FROM t4 EXCEPT SELECT max(rowid) FROM t5 | 296 SELECT max(rowid) FROM t4 EXCEPT SELECT max(rowid) FROM t5 |
297 ) | 297 ) |
298 } | 298 } |
299 } {{}} | 299 } {{}} |
300 } ;# ifcapable compound&&subquery | 300 } ;# ifcapable compound&&subquery |
301 | 301 |
302 # If there is a NULL in an aggregate max() or min(), ignore it. An | 302 # If there is a NULL in an aggregate max() or min(), ignore it. An |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 } {{} {}} | 378 } {{} {}} |
379 } | 379 } |
380 do_test minmax2-10.12 { | 380 do_test minmax2-10.12 { |
381 execsql { | 381 execsql { |
382 SELECT min(x), max(x) FROM t6; | 382 SELECT min(x), max(x) FROM t6; |
383 } | 383 } |
384 } {{} {}} | 384 } {{} {}} |
385 | 385 |
386 | 386 |
387 finish_test | 387 finish_test |
OLD | NEW |