mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix BEGIN IMMEDIATE and BEGIN EXCLUSIVE so that they work even if one or
more of the database files in the connection are read-only. Test cases for this are in TH3. FossilOrigin-Name: 2fa08c3963f008d4723c3f4f4496abcb6d4b575c85ba4a911a6aed5730b5948b
This commit is contained in:
@@ -3487,7 +3487,8 @@ case OP_AutoCommit: {
|
||||
** active.
|
||||
** If P2 is non-zero, then a write-transaction is started, or if a
|
||||
** read-transaction is already active, it is upgraded to a write-transaction.
|
||||
** If P2 is zero, then a read-transaction is started.
|
||||
** If P2 is zero, then a read-transaction is started. If P2 is 2 or more
|
||||
** then an exclusive transaction is started.
|
||||
**
|
||||
** P1 is the index of the database file on which the transaction is
|
||||
** started. Index 0 is the main database file and index 1 is the
|
||||
@@ -3521,6 +3522,7 @@ case OP_Transaction: {
|
||||
|
||||
assert( p->bIsReader );
|
||||
assert( p->readOnly==0 || pOp->p2==0 );
|
||||
assert( pOp->p2>=0 && pOp->p2<=2 );
|
||||
assert( pOp->p1>=0 && pOp->p1<db->nDb );
|
||||
assert( DbMaskTest(p->btreeMask, pOp->p1) );
|
||||
if( pOp->p2 && (db->flags & SQLITE_QueryOnly)!=0 ){
|
||||
|
Reference in New Issue
Block a user