diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-08-29 12:31:25 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-08-29 12:31:25 +0000 |
commit | a1644fd86384de5f37fc42a7fb871a8c9a12dab5 (patch) | |
tree | ccd22487d7d42e8de86c109311e9d8aef043154a /test/malloc.test | |
parent | 1fee73e74acab48412a3c596d4cd68deecadeef6 (diff) | |
download | sqlite-a1644fd86384de5f37fc42a7fb871a8c9a12dab5.tar.gz sqlite-a1644fd86384de5f37fc42a7fb871a8c9a12dab5.zip |
Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)
FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
Diffstat (limited to 'test/malloc.test')
-rw-r--r-- | test/malloc.test | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/malloc.test b/test/malloc.test index 6f9799386..de81cf720 100644 --- a/test/malloc.test +++ b/test/malloc.test @@ -16,7 +16,7 @@ # to see what happens in the library if a malloc were to really fail # due to an out-of-memory situation. # -# $Id: malloc.test,v 1.44 2007/08/22 20:18:22 drh Exp $ +# $Id: malloc.test,v 1.45 2007/08/29 12:31:29 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -215,7 +215,8 @@ if {$::sqlite_options(utf16)} { sqlite3_column_int $::STMT 0 sqlite3_column_text16 $::STMT 1 sqlite3_column_double $::STMT 1 - sqlite3_reset $::STMT + set rc [sqlite3_reset $::STMT] + if {$rc eq "SQLITE_NOMEM"} {error "out of memory"} sqlite3_bind_text16 $::STMT 1 $::bomstr 60 #catch {sqlite3_finalize $::STMT} #if {[lindex [sqlite_malloc_stat] 2]<=0} { |