1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Adjust the costs in the xBestIndex function of the spellfix1 virtual table

to force the use of the MATCH term if it is available.

FossilOrigin-Name: f003bea9fe1b79e2b4d18fbef86c1d8f0f60e4b6
This commit is contained in:
drh
2013-07-09 15:56:44 +00:00
parent 1f10c28618
commit 580d7dc71d
3 changed files with 9 additions and 9 deletions

View File

@ -2148,10 +2148,10 @@ static int spellfix1BestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
pIdxInfo->aConstraintUsage[iDistTerm].argvIndex = idx++;
pIdxInfo->aConstraintUsage[iDistTerm].omit = 1;
}
pIdxInfo->estimatedCost = (double)10000;
pIdxInfo->estimatedCost = 1e5;
}else{
pIdxInfo->idxNum = 0;
pIdxInfo->estimatedCost = (double)10000000;
pIdxInfo->estimatedCost = 1e50;
}
return SQLITE_OK;
}