mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Additional schema mutex checks for sqlite3RootPageMoved().
Reduce the scope of sqlite3ResetInternalSchema() in a few places. FossilOrigin-Name: 39c00907833413c0d97d3e06fdda967b825d23ea
This commit is contained in:
@@ -472,6 +472,7 @@ static void schemaIsValid(Parse *pParse){
|
||||
sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
|
||||
assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
|
||||
if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){
|
||||
sqlite3ResetInternalSchema(db, iDb);
|
||||
pParse->rc = SQLITE_SCHEMA;
|
||||
}
|
||||
|
||||
@@ -613,9 +614,6 @@ static int sqlite3Prepare(
|
||||
if( pParse->checkSchema ){
|
||||
schemaIsValid(pParse);
|
||||
}
|
||||
if( pParse->rc==SQLITE_SCHEMA ){
|
||||
sqlite3ResetInternalSchema(db, -1);
|
||||
}
|
||||
if( db->mallocFailed ){
|
||||
pParse->rc = SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user