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

Detect corruption in the form of the sqlite_sequence table pointing to the

wrong type of btree.

FossilOrigin-Name: 525deb7a67fbd64726c89d5cc36a54b090111e31239431efeeb2bda9836828e0
This commit is contained in:
drh
2018-03-16 23:59:36 +00:00
parent 86c369428f
commit 0d060a071e
3 changed files with 11 additions and 8 deletions

View File

@@ -4287,6 +4287,10 @@ case OP_NewRowid: { /* out2 */
pOut = out2Prerelease(p, pOp);
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
pC = p->apCsr[pOp->p1];
if( !pC->isTable ){
rc = SQLITE_CORRUPT_BKPT;
goto abort_due_to_error;
}
assert( pC!=0 );
assert( pC->eCurType==CURTYPE_BTREE );
assert( pC->uc.pCursor!=0 );