diff options
author | dan <Dan Kennedy> | 2024-09-30 17:28:45 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2024-09-30 17:28:45 +0000 |
commit | d5838eaa42c103649fde3ee1806ff03f7ddece9d (patch) | |
tree | 5a3db14340d3a82d46b8f482b6f404ab34d8b91c /ext/fts5/fts5_index.c | |
parent | 54fd01c4ab06c511c55235de039a7955117fddf0 (diff) | |
download | sqlite-d5838eaa42c103649fde3ee1806ff03f7ddece9d.tar.gz sqlite-d5838eaa42c103649fde3ee1806ff03f7ddece9d.zip |
In fts5, avoid starting a new merge of level L if there exists already an ongoing merge of a level less than L.
FossilOrigin-Name: 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a
Diffstat (limited to 'ext/fts5/fts5_index.c')
-rw-r--r-- | ext/fts5/fts5_index.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c index 4363305a5..a51ae19e7 100644 --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -4889,6 +4889,11 @@ static int fts5IndexFindDeleteMerge(Fts5Index *p, Fts5Structure *pStruct){ nBest = nPercent; } } + + /* If pLvl is already the input level to an ongoing merge, look no + ** further for a merge candidate. The caller should be allowed to + ** continue merging from pLvl first. */ + if( pLvl->nMerge ) break; } } return iRet; @@ -8813,7 +8818,7 @@ static int fts5structConnectMethod( /* ** We must have a single struct=? constraint that will be passed through -** into the xFilter method. If there is no valid stmt=? constraint, +** into the xFilter method. If there is no valid struct=? constraint, ** then return an SQLITE_CONSTRAINT error. */ static int fts5structBestIndexMethod( |