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

Avoid unnecessary no-op calls from getAndInitPage() to btreeInitPage()

in the btree.c logic.

FossilOrigin-Name: 81f5ae13b2e23daee03151d32515387b7f5ba5e5
This commit is contained in:
drh
2013-12-09 01:04:54 +00:00
parent 7599d4aa44
commit 29f2bad6f0
3 changed files with 8 additions and 8 deletions

View File

@@ -1652,7 +1652,7 @@ static int getAndInitPage(
rc = SQLITE_CORRUPT_BKPT;
}else{
rc = btreeGetPage(pBt, pgno, ppPage, bReadonly);
if( rc==SQLITE_OK ){
if( rc==SQLITE_OK && (*ppPage)->isInit==0 ){
rc = btreeInitPage(*ppPage);
if( rc!=SQLITE_OK ){
releasePage(*ppPage);