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

Fix a performance regression caused by the previous check-in.

FossilOrigin-Name: d7d98d3dff2f0e0cfa5bb8be8e5fd2af5ab470be399eafe3d77b23ee1262f70d
This commit is contained in:
drh
2020-01-07 18:10:01 +00:00
parent 42925d1f1a
commit 406dfcb843
3 changed files with 9 additions and 9 deletions

View File

@@ -2138,11 +2138,11 @@ static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
*/
static Pgno btreePagecount(BtShared *pBt){
assert( (pBt->nPage & 0x80000000)==0 || CORRUPT_DB );
return pBt->nPage & 0x7fffffff;
return pBt->nPage;
}
u32 sqlite3BtreeLastPage(Btree *p){
assert( sqlite3BtreeHoldsMutex(p) );
return btreePagecount(p->pBt);
return btreePagecount(p->pBt) & 0x7fffffff;
}
/*