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

Ensure that every pcache page always has either the PGHDR_DIRTY or the

PGHDR_CLEAN bit set, even during transient page reshuffling during btree
balancing.

FossilOrigin-Name: e67f03c166277951725c194674c84da61c152a5820aa6df55a726f7dda838e92
This commit is contained in:
drh
2022-08-27 14:43:34 +00:00
parent 23593f8e99
commit f6e3e31625
4 changed files with 33 additions and 21 deletions

View File

@@ -8350,7 +8350,8 @@ static int balance_nonroot(
aPgOrder[iBest] = 0xffffffff;
if( iBest!=i ){
if( iBest>i ){
sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1, 0);
sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1,
aPgFlags[iBest]);
}
sqlite3PagerRekey(apNew[i]->pDbPage, pgno, aPgFlags[iBest]);
apNew[i]->pgno = pgno;