| OLD | NEW |
| 1 # 2007 Aug 10 | 1 # 2007 Aug 10 |
| 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 #*********************************************************************** |
| 11 # | 11 # |
| 12 # This test script reproduces the problem reported by ticket #2565, | 12 # This test script reproduces the problem reported by ticket #2565, |
| 13 # A database corruption bug that occurs in auto_vacuum mode when | 13 # A database corruption bug that occurs in auto_vacuum mode when |
| 14 # the soft_heap_limit is set low enough to be triggered. | 14 # the soft_heap_limit is set low enough to be triggered. |
| 15 # | 15 # |
| 16 # $Id: softheap1.test,v 1.5 2008/07/08 17:13:59 danielk1977 Exp $ | 16 # $Id: softheap1.test,v 1.5 2008/07/08 17:13:59 danielk1977 Exp $ |
| 17 | 17 |
| 18 | 18 |
| 19 set testdir [file dirname $argv0] | 19 set testdir [file dirname $argv0] |
| 20 source $testdir/tester.tcl | 20 source $testdir/tester.tcl |
| 21 | 21 |
| 22 ifcapable !integrityck { | 22 ifcapable !integrityck { |
| 23 finish_test | 23 finish_test |
| 24 return | 24 return |
| 25 } | 25 } |
| 26 | 26 |
| 27 # EVIDENCE-OF: R-26343-45930 This pragma invokes the |
| 28 # sqlite3_soft_heap_limit64() interface with the argument N, if N is |
| 29 # specified and is a non-negative integer. |
| 30 # |
| 31 # EVIDENCE-OF: R-64451-07163 The soft_heap_limit pragma always returns |
| 32 # the same integer that would be returned by the |
| 33 # sqlite3_soft_heap_limit64(-1) C-language function. |
| 34 # |
| 27 do_test softheap1-1.0 { | 35 do_test softheap1-1.0 { |
| 28 execsql {PRAGMA soft_heap_limit} | 36 execsql {PRAGMA soft_heap_limit} |
| 29 } [sqlite3_soft_heap_limit -1] | 37 } [sqlite3_soft_heap_limit -1] |
| 30 do_test softheap1-1.1 { | 38 do_test softheap1-1.1 { |
| 31 execsql {PRAGMA soft_heap_limit=123456; PRAGMA soft_heap_limit;} | 39 execsql {PRAGMA soft_heap_limit=123456; PRAGMA soft_heap_limit;} |
| 32 } {123456 123456} | 40 } {123456 123456} |
| 33 do_test softheap1-1.2 { | 41 do_test softheap1-1.2 { |
| 34 sqlite3_soft_heap_limit -1 | 42 sqlite3_soft_heap_limit -1 |
| 35 } {123456} | 43 } {123456} |
| 36 do_test softheap1-1.3 { | 44 do_test softheap1-1.3 { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 57 execsql { | 65 execsql { |
| 58 ROLLBACK; | 66 ROLLBACK; |
| 59 } | 67 } |
| 60 execsql { | 68 execsql { |
| 61 PRAGMA integrity_check; | 69 PRAGMA integrity_check; |
| 62 } | 70 } |
| 63 } {ok} | 71 } {ok} |
| 64 | 72 |
| 65 sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit) | 73 sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit) |
| 66 finish_test | 74 finish_test |
| OLD | NEW |