SQLite

Check-in [ad8fc5d8b4]
Login

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

Overview
Comment:Remove an ALWAYS() that was previously added by check-in [a0819086] but which turns out can sometimes be false.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ad8fc5d8b440c49df95328df0408be699dde5a1dbd195b3f1f32e5f765578032
User & Date: drh 2019-05-08 04:33:17.529
Context
2019-05-08
11:52
Fix VDBE opcodes OP_SeekLT and OP_SeekLE so that they work on intkey tables with non-numeric text values. Fix for [9cf6c9bb]. (check-in: 658b84d7f4 user: dan tags: trunk)
11:42
Fix VDBE opcodes OP_SeekLT and OP_SeekLE so that they work on intkey tables with non-numeric text values. (Closed-Leaf check-in: a870c196d7 user: dan tags: tkt-9cf6c9bb)
04:33
Remove an ALWAYS() that was previously added by check-in [a0819086] but which turns out can sometimes be false. (check-in: ad8fc5d8b4 user: drh tags: trunk)
03:34
Remove a NEVER() that was added in the previous check-in [a0819086a521f] because it is in fact reachable. (check-in: 74eba2558a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
  ** and the reserved space is zero (the usual value for reserved space)
  ** then the cell content offset of an empty page wants to be 65536.
  ** However, that integer is too large to be stored in a 2-byte unsigned
  ** integer, so a value of 0 is used in its place. */
  top = get2byte(&data[hdr+5]);
  assert( top<=(int)pPage->pBt->usableSize ); /* by btreeComputeFreeSpace() */
  if( gap>top ){
    if( top==0 && ALWAYS(pPage->pBt->usableSize==65536) ){
      top = 65536;
    }else{
      return SQLITE_CORRUPT_PAGE(pPage);
    }
  }

  /* If there is enough space between gap and top for one more cell pointer,







|







1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
  ** and the reserved space is zero (the usual value for reserved space)
  ** then the cell content offset of an empty page wants to be 65536.
  ** However, that integer is too large to be stored in a 2-byte unsigned
  ** integer, so a value of 0 is used in its place. */
  top = get2byte(&data[hdr+5]);
  assert( top<=(int)pPage->pBt->usableSize ); /* by btreeComputeFreeSpace() */
  if( gap>top ){
    if( top==0 && pPage->pBt->usableSize==65536 ){
      top = 65536;
    }else{
      return SQLITE_CORRUPT_PAGE(pPage);
    }
  }

  /* If there is enough space between gap and top for one more cell pointer,
Changes to test/fuzzdata8.db.

cannot compute difference between binary files