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

Side by Side Diff: third_party/sqlite/src/test/memdb.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/mem5.test ('k') | third_party/sqlite/src/test/memleak.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 # 2001 September 15 1 # 2001 September 15
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } {1 4} 356 } {1 4}
357 } 357 }
358 358
359 do_test memdb-6.15 { 359 do_test memdb-6.15 {
360 execsql { 360 execsql {
361 DELETE FROM t5 WHERE x>0; 361 DELETE FROM t5 WHERE x>0;
362 SELECT * FROM t5; 362 SELECT * FROM t5;
363 } 363 }
364 } {} 364 } {}
365 365
366 ifcapable subquery { 366 ifcapable subquery&&vtab {
367 do_test memdb-7.1 { 367 do_test memdb-7.1 {
368 register_wholenumber_module db
368 execsql { 369 execsql {
369 CREATE TABLE t6(x); 370 CREATE TABLE t6(x);
370 INSERT INTO t6 VALUES(1); 371 CREATE VIRTUAL TABLE nums USING wholenumber;
371 INSERT INTO t6 SELECT x+1 FROM t6; 372 INSERT INTO t6 SELECT value FROM nums WHERE value BETWEEN 1 AND 256;
372 INSERT INTO t6 SELECT x+2 FROM t6;
373 INSERT INTO t6 SELECT x+4 FROM t6;
374 INSERT INTO t6 SELECT x+8 FROM t6;
375 INSERT INTO t6 SELECT x+16 FROM t6;
376 INSERT INTO t6 SELECT x+32 FROM t6;
377 INSERT INTO t6 SELECT x+64 FROM t6;
378 INSERT INTO t6 SELECT x+128 FROM t6;
379 SELECT count(*) FROM (SELECT DISTINCT x FROM t6); 373 SELECT count(*) FROM (SELECT DISTINCT x FROM t6);
380 } 374 }
381 } {256} 375 } {256}
382 for {set i 1} {$i<=256} {incr i} { 376 for {set i 1} {$i<=256} {incr i} {
383 do_test memdb-7.2.$i { 377 do_test memdb-7.2.$i {
384 execsql "DELETE FROM t6 WHERE x=\ 378 execsql "DELETE FROM t6 WHERE x=\
385 (SELECT x FROM t6 ORDER BY random() LIMIT 1)" 379 (SELECT x FROM t6 ORDER BY random() LIMIT 1)"
386 execsql {SELECT count(*) FROM t6} 380 execsql {SELECT count(*) FROM t6}
387 } [expr {256-$i}] 381 } [expr {256-$i}]
388 } 382 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 set pgovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 1] 423 set pgovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 1]
430 execsql { DELETE FROM t1 } 424 execsql { DELETE FROM t1 }
431 set memused2 [lindex [sqlite3_status SQLITE_STATUS_MEMORY_USED 0] 1] 425 set memused2 [lindex [sqlite3_status SQLITE_STATUS_MEMORY_USED 0] 1]
432 expr {($memused2 + 2048 < $memused) || $pgovfl==0} 426 expr {($memused2 + 2048 < $memused) || $pgovfl==0}
433 } {1} 427 } {1}
434 } 428 }
435 429
436 } ;# ifcapable memorydb 430 } ;# ifcapable memorydb
437 431
438 finish_test 432 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/mem5.test ('k') | third_party/sqlite/src/test/memleak.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698