1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Break out the test for writable shadow tables into a separate subroutine.

FossilOrigin-Name: 8ad34d36a141fa8f5d9bd784dfeb892c983897a6dc6b867607cc668508acf944
This commit is contained in:
drh
2019-11-16 13:51:31 +00:00
parent d0c51d1a04
commit 070ae3beea
6 changed files with 37 additions and 23 deletions

View File

@@ -70,11 +70,7 @@ static int tabIsReadOnly(Parse *pParse, Table *pTab){
return sqlite3WritableSchema(db)==0 && pParse->nested==0;
}
assert( pTab->tabFlags & TF_Shadow );
return (db->flags & SQLITE_Defensive)!=0
#ifndef SQLITE_OMIT_VIRTUALTABLE
&& db->pVtabCtx==0
#endif
&& db->nVdbeExec==0;
return sqlite3ReadOnlyShadowTables(db);
}
/*