summaryrefslogtreecommitdiffstats
path: root/src/pragma.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 17:30:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 17:30:13 +0000
commit5e33abd9c783fe2b9deae602544f1f6f0889958a (patch)
tree120f37dcc1339c59c97cd336badef4633015ec23 /src/pragma.c
parentAdding upstream version 3.45.2. (diff)
downloadsqlite3-5e33abd9c783fe2b9deae602544f1f6f0889958a.tar.xz
sqlite3-5e33abd9c783fe2b9deae602544f1f6f0889958a.zip
Adding upstream version 3.45.3.upstream/3.45.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pragma.c')
-rw-r--r--src/pragma.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pragma.c b/src/pragma.c
index a1243ac..0a68732 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -2756,7 +2756,11 @@ static int pragmaVtabBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
j = seen[0]-1;
pIdxInfo->aConstraintUsage[j].argvIndex = 1;
pIdxInfo->aConstraintUsage[j].omit = 1;
- if( seen[1]==0 ) return SQLITE_OK;
+ if( seen[1]==0 ){
+ pIdxInfo->estimatedCost = (double)1000;
+ pIdxInfo->estimatedRows = 1000;
+ return SQLITE_OK;
+ }
pIdxInfo->estimatedCost = (double)20;
pIdxInfo->estimatedRows = 20;
j = seen[1]-1;