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

Fix a problem in sqlite3PagerMovepage() when working on a temp table for which

pages have been spilled.

FossilOrigin-Name: 20cf8811caf705b482be100baecb3ef72aee2d5a
This commit is contained in:
drh
2016-05-10 20:03:08 +00:00
parent 3791c9c288
commit d12bc6022b
4 changed files with 38 additions and 9 deletions

View File

@@ -6926,8 +6926,7 @@ int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
** to exist, in case the transaction needs to roll back. Use pPgOld
** as the original page since it has already been allocated.
*/
if( pPager->tempFile ){
assert( pPgOld );
if( pPager->tempFile && pPgOld ){
sqlite3PcacheMove(pPgOld, origPgno);
sqlite3PagerUnrefNotNull(pPgOld);
}