mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Avoid deleting a b-tree "has-content" vector belonging to another shared-cache connection from within sqlite3_close().
FossilOrigin-Name: 93462df78247f5634b9f53752cf80056bbfe9aac
This commit is contained in:
@@ -3255,7 +3255,6 @@ static void btreeEndTransaction(Btree *p){
|
||||
#ifndef SQLITE_OMIT_AUTOVACUUM
|
||||
pBt->bDoTruncate = 0;
|
||||
#endif
|
||||
btreeClearHasContent(pBt);
|
||||
if( p->inTrans>TRANS_NONE && p->db->activeVdbeCnt>1 ){
|
||||
/* If there are other active statements that belong to this database
|
||||
** handle, downgrade to a read-only transaction. The other statements
|
||||
@@ -3330,6 +3329,7 @@ int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
|
||||
return rc;
|
||||
}
|
||||
pBt->inTransaction = TRANS_READ;
|
||||
btreeClearHasContent(pBt);
|
||||
}
|
||||
|
||||
btreeEndTransaction(p);
|
||||
@@ -3453,6 +3453,7 @@ int sqlite3BtreeRollback(Btree *p, int tripCode){
|
||||
}
|
||||
assert( countWriteCursors(pBt)==0 );
|
||||
pBt->inTransaction = TRANS_READ;
|
||||
btreeClearHasContent(pBt);
|
||||
}
|
||||
|
||||
btreeEndTransaction(p);
|
||||
|
Reference in New Issue
Block a user