/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  9311   9311   
  9312   9312       /* Check for integer primary key out of range */
  9313   9313       if( pPage->intKey ){
  9314   9314         if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
  9315   9315           checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
  9316   9316         }
  9317   9317         maxKey = info.nKey;
         9318  +      keyCanBeEqual = 0;     /* Only the first key on the page may ==maxKey */
  9318   9319       }
  9319   9320   
  9320   9321       /* Check the content overflow list */
  9321   9322       if( info.nPayload>info.nLocal ){
  9322   9323         int nPage;       /* Number of pages on the overflow chain */
  9323   9324         Pgno pgnoOvfl;   /* First page of the overflow chain */
  9324   9325         assert( pc + info.nSize - 4 <= usableSize );