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

Improved corrupt database detection in the relocatePage() routine of

the b-tree module.

FossilOrigin-Name: d57873337a2a7a0d717dc7726cd2682b5bea594d2d1ff8f16c2485161fcd6b16
This commit is contained in:
drh
2018-10-31 01:04:18 +00:00
parent b74cf4b6ea
commit 49272bc728
3 changed files with 9 additions and 8 deletions

View File

@@ -3586,6 +3586,7 @@ static int relocatePage(
eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );
assert( sqlite3_mutex_held(pBt->mutex) );
assert( pDbPage->pBt==pBt );
if( iDbPage<3 ) return SQLITE_CORRUPT_BKPT;
/* Move page iDbPage from its current location to page number iFreePage */
TRACE(("AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\n",