mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add tests to cover untested branches in recent fts5 changes.
FossilOrigin-Name: fa0033edf6ddf3c6631fa95b343225dbc8ac9429
This commit is contained in:
@ -4553,11 +4553,10 @@ int sqlite3Fts5IndexOptimize(Fts5Index *p){
|
||||
}
|
||||
fts5StructureRelease(pStruct);
|
||||
|
||||
if( pNew && pNew->nSegment>0 ){
|
||||
assert( pNew==0 || pNew->nSegment>0 );
|
||||
if( pNew ){
|
||||
int iLvl;
|
||||
for(iLvl=0; iLvl<pNew->nLevel; iLvl++){
|
||||
if( pNew->aLevel[iLvl].nSeg ) break;
|
||||
}
|
||||
for(iLvl=0; pNew->aLevel[iLvl].nSeg==0; iLvl++){}
|
||||
while( p->rc==SQLITE_OK && pNew->aLevel[iLvl].nSeg>0 ){
|
||||
int nRem = FTS5_OPT_WORK_UNIT;
|
||||
fts5IndexMergeLevel(p, &pNew, iLvl, &nRem);
|
||||
|
Reference in New Issue
Block a user