diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-10-22 10:45:37 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-10-22 10:45:37 +0000 |
commit | d207d8084ea52e68342a5d90e01727a31dde71de (patch) | |
tree | 690ec284a34c630b548b2a8a5181deec6de3f927 /test/attachmalloc.test | |
parent | 6553c5c81a5206e257bd762e804d0bdb194011d8 (diff) | |
download | sqlite-d207d8084ea52e68342a5d90e01727a31dde71de.tar.gz sqlite-d207d8084ea52e68342a5d90e01727a31dde71de.zip |
Fix an assert() failure that can occur following a malloc() failure. Ticket #3455. (CVS 5834)
FossilOrigin-Name: e0d3aa75b4fa0e706185a3058b5962916e30d066
Diffstat (limited to 'test/attachmalloc.test')
-rw-r--r-- | test/attachmalloc.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/attachmalloc.test b/test/attachmalloc.test index a6de5cecb..30841cea7 100644 --- a/test/attachmalloc.test +++ b/test/attachmalloc.test @@ -12,7 +12,7 @@ # focus of this script is testing the ATTACH statement and # specifically out-of-memory conditions within that command. # -# $Id: attachmalloc.test,v 1.9 2008/08/04 20:13:27 drh Exp $ +# $Id: attachmalloc.test,v 1.10 2008/10/22 10:45:38 danielk1977 Exp $ # set testdir [file dirname $argv0] @@ -46,4 +46,18 @@ do_malloc_test attachmalloc-1 -tclprep { CREATE TABLE four.t1(x); } +do_malloc_test attachmalloc-2 -tclprep { + file delete -force test2.db + file delete -force test2.db-journal + sqlite3 db2 test2.db + db2 eval { + CREATE TABLE t1(a, b, c); + CREATE INDEX i1 ON t1(a, b); + } + db2 close +} -sqlbody { + CREATE TABLE t1(d, e, f); + ATTACH 'test2.db' AS db1; +} + finish_test |