mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Earlier detection of incompatible sibling pages in balance_nonroot.
FossilOrigin-Name: 60a09f17d8b70dbc4b020586a1b81bce76882729
This commit is contained in:
@@ -6878,6 +6878,14 @@ static int balance_nonroot(
|
||||
int limit;
|
||||
MemPage *pOld = apOld[i];
|
||||
|
||||
/* Verify that all sibling pages are of the same "type" (table-leaf,
|
||||
** table-interior, index-leaf, or index-interior).
|
||||
*/
|
||||
if( pOld->aData[0]!=apOld[0]->aData[0] ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto balance_cleanup;
|
||||
}
|
||||
|
||||
limit = pOld->nCell+pOld->nOverflow;
|
||||
if( pOld->nOverflow>0 ){
|
||||
for(j=0; j<limit; j++){
|
||||
|
Reference in New Issue
Block a user