/ Check-in [adcad37b]
Login

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

Overview
Comment:Enhance "PRAGMA integrity_check" to detect duplicate rowids within a leaf page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: adcad37b001d255299be716b16003b56ec1fba349ef73261ee0e543186c4f311
User & Date: dan 2017-05-01 18:24:01
Context
2017-05-02
01:30
Fix typo in comment. No changes to code. check-in: 6674814a user: mistachkin tags: trunk
2017-05-01
20:07
Update this branch with latest trunk changes. check-in: 83b1e163 user: dan tags: server-edition
18:24
Enhance "PRAGMA integrity_check" to detect duplicate rowids within a leaf page. check-in: adcad37b user: dan tags: trunk
18:12
Clear the BTCF_ValidNKey flag set if a cursor is moved by sqlite3BtreeInsert(). Fix for [f68dc596c4]. check-in: a6727eef user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/btree.c.

9311
9312
9313
9314
9315
9316
9317

9318
9319
9320
9321
9322
9323
9324

    /* Check for integer primary key out of range */
    if( pPage->intKey ){
      if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
        checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
      }
      maxKey = info.nKey;

    }

    /* Check the content overflow list */
    if( info.nPayload>info.nLocal ){
      int nPage;       /* Number of pages on the overflow chain */
      Pgno pgnoOvfl;   /* First page of the overflow chain */
      assert( pc + info.nSize - 4 <= usableSize );







>







9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325

    /* Check for integer primary key out of range */
    if( pPage->intKey ){
      if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
        checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
      }
      maxKey = info.nKey;
      keyCanBeEqual = 0;     /* Only the first key on the page may ==maxKey */
    }

    /* Check the content overflow list */
    if( info.nPayload>info.nLocal ){
      int nPage;       /* Number of pages on the overflow chain */
      Pgno pgnoOvfl;   /* First page of the overflow chain */
      assert( pc + info.nSize - 4 <= usableSize );