mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix errors in the table resize detection.
FossilOrigin-Name: 4229caec0b60a1617b9d5ff94b47271cbd7be1e0
This commit is contained in:
@@ -5331,8 +5331,8 @@ i64 sqlite3BtreeRowCountEst(BtCursor *pCur){
|
||||
assert( cursorOwnsBtShared(pCur) );
|
||||
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
|
||||
if( pCur->eState!=CURSOR_VALID ) return -1;
|
||||
if( pCur->apPage[pCur->iPage-1]->leaf==0 ) return -1;
|
||||
for(n=1, i=0; i<pCur->iPage; i++){
|
||||
if( pCur->apPage[pCur->iPage]->leaf==0 ) return -1;
|
||||
for(n=1, i=0; i<=pCur->iPage; i++){
|
||||
n *= pCur->apPage[i]->nCell;
|
||||
}
|
||||
return n;
|
||||
|
Reference in New Issue
Block a user