1
0
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:
dan
2013-03-21 15:57:32 +00:00
parent c71b45e619
commit 5b068f8632
3 changed files with 8 additions and 8 deletions

View File

@@ -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);
}