/ Check-in [4e621af1]
Login

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

Overview
Comment:Fix a faulty assert() in btree.c. Update the database fuzz test file with new test cases.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4e621af1345a001360938de76e3b0a14deb5e991
User & Date: drh 2015-06-02 14:02:18
Context
2015-06-02
16:19
Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB to avoid confusion with "no affinity". check-in: 29ad9e91 user: drh tags: trunk
15:32
Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. Closed-Leaf check-in: bce3f041 user: drh tags: blob-affinity-rename
14:02
Fix a faulty assert() in btree.c. Update the database fuzz test file with new test cases. check-in: 4e621af1 user: drh tags: trunk
2015-06-01
18:13
Corrections to comments in expr.c. No code changes. check-in: f925389e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  6137   6137       assert( sqlite3PagerIswriteable(pPage->pDbPage) );
  6138   6138       data = pPage->aData;
  6139   6139       cellOffset = pPage->cellOffset;
  6140   6140       end = cellOffset + 2*pPage->nCell;
  6141   6141       ins = cellOffset + 2*i;
  6142   6142       rc = allocateSpace(pPage, sz, &idx);
  6143   6143       if( rc ){ *pRC = rc; return; }
  6144         -    /* The allocateSpace() routine guarantees the following two properties
  6145         -    ** if it returns success */
  6146         -    assert( idx >= end+2 );
         6144  +    /* The allocateSpace() routine guarantees the following properties
         6145  +    ** if it returns successfully */
         6146  +    assert( idx >= 0 && (idx >= end+2 || CORRUPT_DB) );
  6147   6147       assert( idx+sz <= (int)pPage->pBt->usableSize );
  6148   6148       pPage->nCell++;
  6149   6149       pPage->nFree -= (u16)(2 + sz);
  6150   6150       memcpy(&data[idx], pCell, sz);
  6151   6151       if( iChild ){
  6152   6152         put4byte(&data[idx], iChild);
  6153   6153       }

Changes to test/fuzzdata3.db.

cannot compute difference between binary files