1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Ensure that the "Any prior cache entry associated with newKey is guaranteed not to be pinned" guarantee made to xRekey implementations is not violated.

FossilOrigin-Name: ecc3544e712041736af7c7b4f34864a1f2e30ff7
This commit is contained in:
dan
2014-10-24 20:57:03 +00:00
parent 23eba45d23
commit 31f4e99d44
4 changed files with 21 additions and 30 deletions

View File

@@ -6853,10 +6853,7 @@ int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
** page number to iNew and sets the value of the PgHdr.flags field to
** the value passed as the third parameter.
*/
void sqlite3PagerRekey(DbPage *pPage, Pgno iNew, u16 flags){
PgHdr *pPg = (PgHdr*)pPage;
assert( (flags & PGHDR_DIRTY) && (pPg->flags & PGHDR_DIRTY) );
assert( !subjRequiresPage(pPg) );
void sqlite3PagerRekey(DbPage *pPg, Pgno iNew, u16 flags){
assert( pPg->pgno!=iNew );
pPg->flags = flags;
sqlite3PcacheMove(pPg, iNew);