Fix an assert() that might not be true if the %_segdir table of FTS3 contains

corrupt entries.

FossilOrigin-Name: a6509ca3dc2602c7d0376230ee63c1bb4c4066f007e77e9ac20d8eee966e5e13
This commit is contained in:
drh
2019-02-18 12:16:03 +00:00
parent 56785a0a80
commit b43ac0021f
4 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -1348,7 +1348,9 @@ static int fts3SegReaderNext(
/* If iCurrentBlock>=iLeafEndBlock, this is an EOF condition. All leaf
** blocks have already been traversed. */
assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock );
#ifdef CORRUPT_DB
assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock || CORRUPT_DB );
#endif
if( pReader->iCurrentBlock>=pReader->iLeafEndBlock ){
return SQLITE_OK;
}