OLD | NEW |
1 # 2008 December 23 | 1 # 2008 December 23 |
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 29 matching lines...) Expand all Loading... |
40 INSERT INTO t1 VALUES(1,2,3,4); | 40 INSERT INTO t1 VALUES(1,2,3,4); |
41 INSERT INTO t1 VALUES(2,3,4,5); | 41 INSERT INTO t1 VALUES(2,3,4,5); |
42 INSERT INTO t1 VALUES(3,4,6,8); | 42 INSERT INTO t1 VALUES(3,4,6,8); |
43 INSERT INTO t1 VALUES(4,5,10,15); | 43 INSERT INTO t1 VALUES(4,5,10,15); |
44 INSERT INTO t1 VALUES(5,10,100,1000); | 44 INSERT INTO t1 VALUES(5,10,100,1000); |
45 CREATE INDEX t1b ON t1(b); | 45 CREATE INDEX t1b ON t1(b); |
46 CREATE INDEX t1c ON t1(c); | 46 CREATE INDEX t1c ON t1(c); |
47 SELECT * FROM t1; | 47 SELECT * FROM t1; |
48 } | 48 } |
49 } {1 2 3 4 2 3 4 5 3 4 6 8 4 5 10 15 5 10 100 1000} | 49 } {1 2 3 4 2 3 4 5 3 4 6 8 4 5 10 15 5 10 100 1000} |
| 50 do_execsql_test where7-1.1.1 { |
| 51 CREATE TABLE t(a); |
| 52 CREATE INDEX ta ON t(a); |
| 53 INSERT INTO t(a) VALUES(1),(2); |
| 54 SELECT * FROM t ORDER BY a; |
| 55 SELECT * FROM t WHERE a<2 OR a<3 ORDER BY a; |
| 56 PRAGMA count_changes=ON; |
| 57 DELETE FROM t WHERE a<2 OR a<3; |
| 58 SELECT * FROM t; |
| 59 PRAGMA count_changes=OFF; |
| 60 DROP TABLE t; |
| 61 } {1 2 1 2 2} |
50 do_test where7-1.2 { | 62 do_test where7-1.2 { |
51 count_steps { | 63 count_steps { |
52 SELECT a FROM t1 WHERE b=3 OR c=6 ORDER BY a | 64 SELECT a FROM t1 WHERE b=3 OR c=6 ORDER BY a |
53 } | 65 } |
54 } {2 3 scan 0 sort 1} | 66 } {2 3 scan 0 sort 1} |
55 do_test where7-1.3 { | 67 do_test where7-1.3 { |
56 count_steps { | 68 count_steps { |
57 SELECT a FROM t1 WHERE b=3 OR +c=6 ORDER BY a | 69 SELECT a FROM t1 WHERE b=3 OR +c=6 ORDER BY a |
58 } | 70 } |
59 } {2 3 scan 4 sort 0} | 71 } {2 3 scan 4 sort 0} |
(...skipping 23279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23339 OR t301.c8 = 1407424651264000) | 23351 OR t301.c8 = 1407424651264000) |
23340 ORDER BY t302.c5 LIMIT 200; | 23352 ORDER BY t302.c5 LIMIT 200; |
23341 } { | 23353 } { |
23342 0 0 1 {SEARCH TABLE t301 USING COVERING INDEX t301_c4 (c4=?)} | 23354 0 0 1 {SEARCH TABLE t301 USING COVERING INDEX t301_c4 (c4=?)} |
23343 0 0 1 {SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)} | 23355 0 0 1 {SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)} |
23344 0 1 0 {SEARCH TABLE t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)} | 23356 0 1 0 {SEARCH TABLE t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)} |
23345 0 0 0 {USE TEMP B-TREE FOR ORDER BY} | 23357 0 0 0 {USE TEMP B-TREE FOR ORDER BY} |
23346 } | 23358 } |
23347 | 23359 |
23348 finish_test | 23360 finish_test |
OLD | NEW |