mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a problem when opening a write-transaction while there exist read-only b-tree cursors in mmap mode.
FossilOrigin-Name: 32e0bbb73609ac3ad096a60f1de3095bc79fb0cc
This commit is contained in:
@@ -2595,7 +2595,7 @@ static int btreeSwapOutMmap(BtShared *pBt){
|
||||
MemPage *pPg = pCsr->apPage[0];
|
||||
if( pPg->pDbPage->flags & PGHDR_MMAP ){
|
||||
MemPage *pNew = 0;
|
||||
rc = btreeGetPage(pBt, pPg->pgno, &pNew, 0, 0);
|
||||
rc = getAndInitPage(pBt, pPg->pgno, &pNew, 0);
|
||||
if( rc==SQLITE_OK && pCsr->iPage==0 ){
|
||||
pCsr->info.pCell = pNew->aData + (pCsr->info.pCell - pPg->aData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user