OLD | NEW |
1 # 2006 September 4 | 1 # 2006 September 4 |
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } {1 2 3} | 252 } {1 2 3} |
253 unset ::echo_module_cost | 253 unset ::echo_module_cost |
254 } | 254 } |
255 | 255 |
256 db close | 256 db close |
257 file delete -force test.db | 257 file delete -force test.db |
258 file delete -force test.db-journal | 258 file delete -force test.db-journal |
259 sqlite3 db test.db | 259 sqlite3 db test.db |
260 | 260 |
261 ifcapable explain { | 261 ifcapable explain { |
262 do_test misc7-14.1 { | 262 do_execsql_test misc7-14.1 { |
263 execsql { | 263 CREATE TABLE abc(a PRIMARY KEY, b, c); |
264 CREATE TABLE abc(a PRIMARY KEY, b, c); | 264 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE rowid = 1; |
265 } | 265 } { |
266 execsql { | 266 0 0 0 {SEARCH TABLE abc AS t2 USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)} |
267 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE rowid = 1; | 267 } |
268 } | 268 do_execsql_test misc7-14.2 { |
269 } {0 0 {TABLE abc AS t2 USING PRIMARY KEY}} | 269 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE a = 1; |
270 do_test misc7-14.2 { | 270 } {0 0 0 |
271 execsql { | 271 {SEARCH TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?) (~1 rows)} |
272 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 WHERE a = 1; | 272 } |
273 } | 273 do_execsql_test misc7-14.3 { |
274 } {0 0 {TABLE abc AS t2 WITH INDEX sqlite_autoindex_abc_1}} | 274 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 ORDER BY a; |
275 do_test misc7-14.3 { | 275 } {0 0 0 |
276 execsql { | 276 {SCAN TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1 (~1000000 rows)} |
277 EXPLAIN QUERY PLAN SELECT * FROM abc AS t2 ORDER BY a; | 277 } |
278 } | |
279 } {0 0 {TABLE abc AS t2 WITH INDEX sqlite_autoindex_abc_1 ORDER BY}} | |
280 } | 278 } |
281 | 279 |
282 db close | 280 db close |
283 file delete -force test.db | 281 file delete -force test.db |
284 file delete -force test.db-journal | 282 file delete -force test.db-journal |
285 sqlite3 db test.db | 283 sqlite3 db test.db |
286 | 284 |
287 #-------------------------------------------------------------------- | 285 #-------------------------------------------------------------------- |
288 # This is all to force the pager_remove_from_stmt_list() function | 286 # This is all to force the pager_remove_from_stmt_list() function |
289 # (inside pager.c) to remove a pager from the middle of the | 287 # (inside pager.c) to remove a pager from the middle of the |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 set zFile [file join [pwd] "[string repeat abcde 104].db"] | 480 set zFile [file join [pwd] "[string repeat abcde 104].db"] |
483 set rc [catch {sqlite3 db2 $zFile} msg] | 481 set rc [catch {sqlite3 db2 $zFile} msg] |
484 list $rc $msg | 482 list $rc $msg |
485 } {1 {unable to open database file}} | 483 } {1 {unable to open database file}} |
486 | 484 |
487 | 485 |
488 db close | 486 db close |
489 file delete -force test.db | 487 file delete -force test.db |
490 | 488 |
491 finish_test | 489 finish_test |
OLD | NEW |