1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Always fill in the 5th parameter to sqlite_exec if there is an error. (CVS 742)

FossilOrigin-Name: 7f8fd5c75d614f81ef87f0fc952c341cbc5076d0
This commit is contained in:
drh
2002-09-03 19:43:23 +00:00
parent 96f4531077
commit b798fa6481
5 changed files with 21 additions and 18 deletions

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: main.c,v 1.100 2002/08/31 18:53:06 drh Exp $
** $Id: main.c,v 1.101 2002/09/03 19:43:24 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -635,6 +635,9 @@ int sqlite_exec(
db->flags &= ~SQLITE_InTrans;
sqliteResetInternalSchema(db);
}
if( sParse.rc!=SQLITE_OK && pzErrMsg && *pzErrMsg==0 ){
sqliteSetString(pzErrMsg, sqlite_error_string(sParse.rc), 0);
}
sqliteStrRealloc(pzErrMsg);
if( sParse.rc==SQLITE_SCHEMA ){
sqliteResetInternalSchema(db);