mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
In btree.c, save the positions of other cursors open on the same table when writing via an incremental blob handle. Otherwise, they may be left holding an out-of-date xFetch page reference.
FossilOrigin-Name: 3f09fba18f7e61e21381ffea13c31b968efd7d77
This commit is contained in:
@@ -8400,6 +8400,15 @@ int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
|
||||
return SQLITE_ABORT;
|
||||
}
|
||||
|
||||
/* Save the positions of all other cursors open on this table. This is
|
||||
** required in case any of them are holding references to an xFetch
|
||||
** version of the b-tree page modified by the accessPayload call below.
|
||||
*/
|
||||
rc = saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
|
||||
if( rc!=SQLITE_OK ){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/* Check some assumptions:
|
||||
** (a) the cursor is open for writing,
|
||||
** (b) there is a read/write transaction open,
|
||||
|
Reference in New Issue
Block a user