Cause sqlite3_exec() to return SQLITE_NOMEM if it cannot allocate memory to

hold the error message for some other error. (CVS 6844)

FossilOrigin-Name: e9849292ab741f4c86203b2629dbe116f9b527c8
This commit is contained in:
drh 2009-07-03 19:18:43 +00:00
parent ee152b00a3
commit 6bef648d97
3 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Remove\san\sunused\svariable\sfrom\sthe\stest\scode\sin\stest3.c.\s(CVS\s6843)
D 2009-07-03T17:23:49
C Cause\ssqlite3_exec()\sto\sreturn\sSQLITE_NOMEM\sif\sit\scannot\sallocate\smemory\sto\nhold\sthe\serror\smessage\sfor\ssome\sother\serror.\s(CVS\s6844)
D 2009-07-03T19:18:43
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -123,7 +123,7 @@ F src/hash.h 35b216c13343d0b4f87d9f21969ac55ad72174e1
F src/hwtime.h 4a1d45f4cae1f402ea19686acf24acf4f0cb53cb
F src/insert.c 94e51344e01aea6be43e95cd24e8baa014d8c3d6
F src/journal.c e00df0c0da8413ab6e1bb7d7cab5665d4a9000d0
F src/legacy.c 9a56cf126ceee332b56061bf16bd0fb4ff9e26c0
F src/legacy.c 54a11649f27ae55f4fcd6e6b5ba836f839cb8704
F src/lempar.c 0c4d1ab0a5ef2b0381eb81a732c54f68f27a574d
F src/loadext.c 0e88a335665db0b2fb4cece3e49dcb65d832635a
F src/main.c 9f6d91815233b517c1bdf16fd8fa838d10d2c015
@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P d426cc64f6014e2c2b9bcde0f5440396aec2fa18
R 71282d767a29083a25c6769a94945778
P 9e35bec9ef924ec44e87294a549238e0104bb27b
R 341fe26eb0dd386449a0180ebccb8c6e
U drh
Z 1d50698ba153e51b17ade341f16a7dc5
Z f0ad1e3c22a8b7adfeeb6fcc68876a62

View File

@ -1 +1 @@
9e35bec9ef924ec44e87294a549238e0104bb27b
e9849292ab741f4c86203b2629dbe116f9b527c8

View File

@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.33 2009/05/05 20:02:48 drh Exp $
** $Id: legacy.c,v 1.34 2009/07/03 19:18:43 drh Exp $
*/
#include "sqliteInt.h"
@ -132,6 +132,8 @@ exec_out:
*pzErrMsg = sqlite3Malloc(nErrMsg);
if( *pzErrMsg ){
memcpy(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
}else{
rc = SQLITE_NOMEM;
}
}else if( pzErrMsg ){
*pzErrMsg = 0;