1
0
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:
drh
2015-05-28 11:23:11 +00:00
parent 24cf1e546c
commit 73d340adff
4 changed files with 16 additions and 8 deletions

View File

@@ -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++){