diff options
author | drh <drh@noemail.net> | 2018-10-30 16:25:35 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-10-30 16:25:35 +0000 |
commit | fd748c6460a5ccfc7db0c2f0564d3f78f6845d19 (patch) | |
tree | f25a2f37b4536c0eecb8e143e7858e9f34b9621b /src/prepare.c | |
parent | a751f39c3fb8f9abd162b44c6d754142f232f1dd (diff) | |
download | sqlite-fd748c6460a5ccfc7db0c2f0564d3f78f6845d19.tar.gz sqlite-fd748c6460a5ccfc7db0c2f0564d3f78f6845d19.zip |
Split the SQLITE_WriteSchema flag in two flags, WriteSchema and
SQLITE_NoSchemaError. Set only WriteSchema on a VACUUM to avoid problems
when trying to vacuum a corrupt database. With this change, the size
of the flags field on sqlite3 must grow from 32 to 64 bytes.
FossilOrigin-Name: 4f9878107a54356b7105fa1db7655ee239685d570436f6ad4d4221c9bd829b3d
Diffstat (limited to 'src/prepare.c')
-rw-r--r-- | src/prepare.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/prepare.c b/src/prepare.c index 602e4dc49..f7e829acb 100644 --- a/src/prepare.c +++ b/src/prepare.c @@ -327,8 +327,8 @@ int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){ rc = SQLITE_NOMEM_BKPT; sqlite3ResetAllSchemasOfConnection(db); } - if( rc==SQLITE_OK || (db->flags&SQLITE_WriteSchema)){ - /* Black magic: If the SQLITE_WriteSchema flag is set, then consider + if( rc==SQLITE_OK || (db->flags&SQLITE_NoSchemaError)){ + /* Black magic: If the SQLITE_NoSchemaError flag is set, then consider ** the schema loaded, even if errors occurred. In this situation the ** current sqlite3_prepare() operation will fail, but the following one ** will attempt to compile the supplied statement against whatever subset |