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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 db close 412 db close
413 sqlite3 db test.db 413 sqlite3 db test.db
414 db cache size 0 414 db cache size 0
415 execsql { 415 execsql {
416 PRAGMA auto_vacuum = full; 416 PRAGMA auto_vacuum = full;
417 CREATE TABLE t1(a); 417 CREATE TABLE t1(a);
418 INSERT INTO t1 VALUES(randstr(1000,1000)); 418 INSERT INTO t1 VALUES(randstr(1000,1000));
419 INSERT INTO t1 VALUES(randstr(1000,1000)); 419 INSERT INTO t1 VALUES(randstr(1000,1000));
420 INSERT INTO t1 VALUES(randstr(1000,1000)); 420 INSERT INTO t1 VALUES(randstr(1000,1000));
421 } 421 }
422 set memused [lindex [sqlite3_status SQLITE_STATUS_MEMORY_USED 0] 1] 422 set before [db one {PRAGMA page_count}]
423 set pgovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 1]
424 execsql { DELETE FROM t1 } 423 execsql { DELETE FROM t1 }
425 set memused2 [lindex [sqlite3_status SQLITE_STATUS_MEMORY_USED 0] 1] 424 set after [db one {PRAGMA page_count}]
426 expr {($memused2 + 2048 < $memused) || $pgovfl==0} 425 expr {$before>$after}
427 } {1} 426 } {1}
428 } 427 }
429 428
430 } ;# ifcapable memorydb 429 } ;# ifcapable memorydb
431 430
432 finish_test 431 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/malloc_common.tcl ('k') | third_party/sqlite/src/test/memsubsys1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698