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

Add the experimental "query_only" pragma.

FossilOrigin-Name: 6557c407983b067449deb76bc4c5248de64e07dc
This commit is contained in:
drh
2013-07-11 15:22:31 +00:00
7 changed files with 91 additions and 11 deletions

View File

@@ -2948,6 +2948,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 ){