SQLite

Check-in [525deb7a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Detect corruption in the form of the sqlite_sequence table pointing to the wrong type of btree.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 525deb7a67fbd64726c89d5cc36a54b090111e31239431efeeb2bda9836828e0
User & Date: drh 2018-03-16 23:59:36
Context
2018-03-17
16:26
Do not use sqlite3_column_decltype() in the CLI if it is compiled with SQLITE_OMIT_DECLTYPE. (check-in: 442e816b user: drh tags: trunk)
2018-03-16
23:59
Detect corruption in the form of the sqlite_sequence table pointing to the wrong type of btree. (check-in: 525deb7a user: drh tags: trunk)
20:23
Detect databases whose schema is corrupted using a CREATE TABLE AS statement and issue an appropriate error message. (check-in: d75e6765 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

4283
4284
4285
4286
4287
4288
4289




4290
4291
4292
4293
4294
4295
4296
  VdbeFrame *pFrame;     /* Root frame of VDBE */

  v = 0;
  res = 0;
  pOut = out2Prerelease(p, pOp);
  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
  pC = p->apCsr[pOp->p1];




  assert( pC!=0 );
  assert( pC->eCurType==CURTYPE_BTREE );
  assert( pC->uc.pCursor!=0 );
  {
    /* The next rowid or record number (different terms for the same
    ** thing) is obtained in a two-step algorithm.
    **







>
>
>
>







4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
  VdbeFrame *pFrame;     /* Root frame of VDBE */

  v = 0;
  res = 0;
  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 );
  {
    /* The next rowid or record number (different terms for the same
    ** thing) is obtained in a two-step algorithm.
    **