/ Check-in [6bfd8655f0]
Login

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

Overview
Comment:Add an "|| CORRUPT_DB" term to an assert() statement in the btree defragmenter.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6bfd8655f006e031c0d4c988356c4b9206efa6bfdb034fde8ffa3361521a4844
User & Date: drh 2019-02-28 13:21:36
Context
2019-02-28
13:41
Avoid an assert() failure and an undefined left-shift operation in the fts3 snippet() function that could occur if the database was corrupt. check-in: d5250db632 user: dan tags: trunk
13:21
Add an "|| CORRUPT_DB" term to an assert() statement in the btree defragmenter. check-in: 6bfd8655f0 user: drh tags: trunk
2019-02-27
23:05
Enable the LIKE optimization when the ESCAPE keyword is present and the PRAGMA case_sensitive_like pragma is ON. check-in: 6ae4b8c525 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  1417   1417     assert( pPage->nOverflow==0 );
  1418   1418     assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  1419   1419     temp = 0;
  1420   1420     src = data = pPage->aData;
  1421   1421     hdr = pPage->hdrOffset;
  1422   1422     cellOffset = pPage->cellOffset;
  1423   1423     nCell = pPage->nCell;
  1424         -  assert( nCell==get2byte(&data[hdr+3]) );
         1424  +  assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
  1425   1425     iCellFirst = cellOffset + 2*nCell;
  1426   1426     usableSize = pPage->pBt->usableSize;
  1427   1427   
  1428   1428     /* This block handles pages with two or fewer free blocks and nMaxFrag
  1429   1429     ** or fewer fragmented bytes. In this case it is faster to move the
  1430   1430     ** two (or one) blocks of cells using memmove() and add the required
  1431   1431     ** offsets to each pointer in the cell-pointer array than it is to 

Changes to test/fuzzdata8.db.

cannot compute difference between binary files