/ Check-in [a6509ca3]
Login

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

Overview
Comment:Fix an assert() that might not be true if the %_segdir table of FTS3 contains corrupt entries.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a6509ca3dc2602c7d0376230ee63c1bb4c4066f007e77e9ac20d8eee966e5e13
User & Date: drh 2019-02-18 12:16:03
Context
2019-02-19
13:08
Always use the symbolic name SQLITE_IDXTYPE_PRIMARYKEY rather than a hard-coded magic number 2. check-in: 55d43adc user: drh tags: trunk
2019-02-18
12:16
Fix an assert() that might not be true if the %_segdir table of FTS3 contains corrupt entries. check-in: a6509ca3 user: drh tags: trunk
2019-02-16
22:45
Fix an assert() that might be false for a corrupt database. check-in: 0cfb8887 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_write.c.

  1344   1344         return SQLITE_OK;
  1345   1345       }
  1346   1346   
  1347   1347       fts3SegReaderSetEof(pReader);
  1348   1348   
  1349   1349       /* If iCurrentBlock>=iLeafEndBlock, this is an EOF condition. All leaf 
  1350   1350       ** blocks have already been traversed.  */
  1351         -    assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock );
         1351  +#ifdef CORRUPT_DB
         1352  +    assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock || CORRUPT_DB );
         1353  +#endif
  1352   1354       if( pReader->iCurrentBlock>=pReader->iLeafEndBlock ){
  1353   1355         return SQLITE_OK;
  1354   1356       }
  1355   1357   
  1356   1358       rc = sqlite3Fts3ReadBlock(
  1357   1359           p, ++pReader->iCurrentBlock, &pReader->aNode, &pReader->nNode, 
  1358   1360           (bIncr ? &pReader->nPopulate : 0)

Changes to test/fuzzdata8.db.

cannot compute difference between binary files