diff options
author | drh <drh@noemail.net> | 2017-06-26 13:57:49 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-06-26 13:57:49 +0000 |
commit | 169dd928c521144e3be5b1fa81aefaa43eb2803f (patch) | |
tree | 3850004946f982cf534e9a94dd36a4e14de141df /src/btree.c | |
parent | a22dd3860a3491d621fec0d0d507c7a0a60d9b6b (diff) | |
download | sqlite-169dd928c521144e3be5b1fa81aefaa43eb2803f.tar.gz sqlite-169dd928c521144e3be5b1fa81aefaa43eb2803f.zip |
Add the SQLITE_DBCONFIG_ENABLE_QPSG option to activate the query planner
stability guarantee. This involves refactoring the sqlite3.flags bitvector
to carve out a free bit to use.
FossilOrigin-Name: 7076e8283ebae1b45a5d85d9538b49b6da399d38c3c6935de100f948f814f6a9
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/btree.c b/src/btree.c index 1f06e4503..be6c0dd17 100644 --- a/src/btree.c +++ b/src/btree.c @@ -152,7 +152,7 @@ static int hasSharedCacheTableLock( ** Return true immediately. */ if( (pBtree->sharable==0) - || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommitted)) + || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommit)) ){ return 1; } @@ -229,7 +229,7 @@ static int hasReadConflicts(Btree *pBtree, Pgno iRoot){ for(p=pBtree->pBt->pCursor; p; p=p->pNext){ if( p->pgnoRoot==iRoot && p->pBtree!=pBtree - && 0==(p->pBtree->db->flags & SQLITE_ReadUncommitted) + && 0==(p->pBtree->db->flags & SQLITE_ReadUncommit) ){ return 1; } @@ -251,7 +251,7 @@ static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){ assert( sqlite3BtreeHoldsMutex(p) ); assert( eLock==READ_LOCK || eLock==WRITE_LOCK ); assert( p->db!=0 ); - assert( !(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 ); + assert( !(p->db->flags&SQLITE_ReadUncommit)||eLock==WRITE_LOCK||iTab==1 ); /* If requesting a write-lock, then the Btree must have an open write ** transaction on this file. And, obviously, for this to be so there @@ -329,7 +329,7 @@ static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){ ** obtain a read-lock using this function. The only read-lock obtained ** by a connection in read-uncommitted mode is on the sqlite_master ** table, and that lock is obtained in BtreeBeginTrans(). */ - assert( 0==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK ); + assert( 0==(p->db->flags&SQLITE_ReadUncommit) || eLock==WRITE_LOCK ); /* This function should only be called on a sharable b-tree after it ** has been determined that no other b-tree holds a conflicting lock. */ @@ -3021,7 +3021,7 @@ static int lockBtree(BtShared *pBt){ pageSize-usableSize); return rc; } - if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){ + if( (pBt->db->flags & SQLITE_WriteSchema)==0 && nPage>nPageFile ){ rc = SQLITE_CORRUPT_BKPT; goto page1_init_failed; } |