| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |