mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix an assert() failure that can occur following a malloc() failure. Ticket #3455. (CVS 5834)
FossilOrigin-Name: e0d3aa75b4fa0e706185a3058b5962916e30d066
This commit is contained in:
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Update\sthe\sautoconf\sbuild\ssystem\sto\sinclude\smemjournal.c.\s(CVS\s5833)
|
||||
D 2008-10-21T04:30:32
|
||||
C Fix\san\sassert()\sfailure\sthat\scan\soccur\sfollowing\sa\smalloc()\sfailure.\sTicket\s#3455.\s(CVS\s5834)
|
||||
D 2008-10-22T10:45:38
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 4352ab12369706c793f3e8165db35b102c929998
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -102,7 +102,7 @@ F src/btmutex.c 3a90096c3080b9057dc570b8e16e46511e1c788a
|
||||
F src/btree.c 3e686f899659df8d79f2587d0f34f51fdf6a6276
|
||||
F src/btree.h 903682f2a88da37435f103da00cb915d63bc8015
|
||||
F src/btreeInt.h e38e9b2b285f40f5bc0a6664f630d4a141622f16
|
||||
F src/build.c 8714bd809583bbe07bf22d0e1808a3fc31abe330
|
||||
F src/build.c d6d55f97abcb6f17ac3e9e7a1dd8c0db67db34fd
|
||||
F src/callback.c e970e5beddbdb23f89a6d05cb1a6419d9f755624
|
||||
F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c
|
||||
F src/date.c 6f4277fa56d8c1b8e70c0bde838c9e99609f5ec0
|
||||
@ -217,7 +217,7 @@ F test/async3.test 9ffa0977a78cc6351862a1583be2b1eecd41736d
|
||||
F test/attach.test 75a5d22f88e730967d68f2c9f95e786e3953d8e3
|
||||
F test/attach2.test a295d2d7061adcee5884ef4a93c7c96a82765437
|
||||
F test/attach3.test 7b92dc8e40c1ebca9732ca6f2d3fefbd46f196df
|
||||
F test/attachmalloc.test ccbde53bcb0a61020afa3e0670ca9c6c5b99af32
|
||||
F test/attachmalloc.test cf8cf17d183de357b1147a9baacbdfc85b940b61
|
||||
F test/auth.test 9eb4b6b99eee54c95711c74c4b9694acf4d850ed
|
||||
F test/auth2.test ee3ba272e2b975e913afc9b041ee75706e190005
|
||||
F test/autoinc.test ab549b48b389cabd92967b86c379ec8b31fa6c16
|
||||
@ -649,7 +649,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 81cfee5c14f241f5ae7f607d73b0b5cb821cda24
|
||||
R c2c7d8cb37eb348018dbe6bab154dcb8
|
||||
P a3c810f0c80e3e9dfe60a0ffd8688d7c76a30d50
|
||||
R eb10ad551dda09e9891a5b737d1b43ef
|
||||
U danielk1977
|
||||
Z 5b6062772586553c07d23b9b4a71be8f
|
||||
Z 78303c07616fabd1b430a1645d928812
|
||||
|
@ -1 +1 @@
|
||||
a3c810f0c80e3e9dfe60a0ffd8688d7c76a30d50
|
||||
e0d3aa75b4fa0e706185a3058b5962916e30d066
|
@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.498 2008/10/06 16:18:40 danielk1977 Exp $
|
||||
** $Id: build.c,v 1.499 2008/10/22 10:45:38 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -2401,7 +2401,7 @@ void sqlite3CreateIndex(
|
||||
}
|
||||
pTab = sqlite3LocateTable(pParse, 0, pTblName->a[0].zName,
|
||||
pTblName->a[0].zDatabase);
|
||||
if( !pTab ) goto exit_create_index;
|
||||
if( !pTab || db->mallocFailed ) goto exit_create_index;
|
||||
assert( db->aDb[iDb].pSchema==pTab->pSchema );
|
||||
}else{
|
||||
assert( pName==0 );
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user