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

Fix a faulty assert() in sqlite3BtreeBeginTrans() that may fail in shared-cache mode.

FossilOrigin-Name: 1e1321ee985370c2b7e5bd64286bb4d7704b5a30
This commit is contained in:
dan
2013-09-26 11:04:33 +00:00
parent 6284d02160
commit 56c517aa5f
4 changed files with 44 additions and 9 deletions

View File

@@ -2668,7 +2668,7 @@ int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
if( p->inTrans==TRANS_WRITE || (p->inTrans==TRANS_READ && !wrflag) ){
goto trans_begun;
}
assert( IfNotOmitAV(pBt->bDoTruncate)==0 );
assert( pBt->inTransaction==TRANS_WRITE || IfNotOmitAV(pBt->bDoTruncate)==0 );
/* Write transactions are not possible on a read-only database */
if( (pBt->btsFlags & BTS_READ_ONLY)!=0 && wrflag ){