mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
The optimization at [ece326db50201937] is not quite right, so back it out
for now. FossilOrigin-Name: b218a4b9fe44ffc5cb8d2a2491a5aad217d37b26ccc6b04caf8f28b71bcfe809
This commit is contained in:
@@ -5494,6 +5494,7 @@ static int getPageNormal(
|
||||
assert( assert_pager_state(pPager) );
|
||||
assert( pPager->hasHeldSharedLock==1 );
|
||||
|
||||
if( pgno==0 ) return SQLITE_CORRUPT_BKPT;
|
||||
pBase = sqlite3PcacheFetch(pPager->pPCache, pgno, 3);
|
||||
if( pBase==0 ){
|
||||
pPg = 0;
|
||||
@@ -5521,10 +5522,10 @@ static int getPageNormal(
|
||||
/* The pager cache has created a new page. Its content needs to
|
||||
** be initialized. But first some error checks:
|
||||
**
|
||||
** (1) Never try to fetch the locking page
|
||||
** (2) Never try to fetch page 0, which does not exist
|
||||
** (*) obsolete. Was: maximum page number is 2^31
|
||||
** (2) Never try to fetch the locking page
|
||||
*/
|
||||
if( pgno==PAGER_SJ_PGNO(pPager) || pgno==0 ){
|
||||
if( pgno==PAGER_SJ_PGNO(pPager) ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto pager_acquire_err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user