1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Experimental "PRAGMA query_only=BOOLEAN" statement that is able to turn

write capabilities on and off.

FossilOrigin-Name: ece960c496717a3a6c25526ef77dd76b08d607bc
This commit is contained in:
drh
2013-07-10 13:33:49 +00:00
parent 49afe3aaa0
commit 13447bf6c7
5 changed files with 18 additions and 9 deletions

View File

@@ -2946,6 +2946,10 @@ case OP_Transaction: {
assert( p->readOnly==0 || pOp->p2==0 );
assert( pOp->p1>=0 && pOp->p1<db->nDb );
assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
if( pOp->p2 && (db->flags & SQLITE_QueryOnly)!=0 ){
rc = SQLITE_READONLY;
goto abort_due_to_error;
}
pBt = db->aDb[pOp->p1].pBt;
if( pBt ){