Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: third_party/sqlite/src/test/misc7.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/misc5.test ('k') | third_party/sqlite/src/test/multiplex.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/misc5.test ('k') | third_party/sqlite/src/test/multiplex.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698