Skip to content

Commit

Permalink
guard sqlite3_vtab_in
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Nov 19, 2024
1 parent d0993b7 commit 0123b24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlite-vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5504,7 +5504,6 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) {
if (sqlite3_libversion_number() >= 3038000) {
vtabIn = sqlite3_vtab_in(pIdxInfo, i, -1);
}
#endif
if(vtabIn) {
switch(p->metadata_columns[metadata_idx].kind) {
case VEC0_METADATA_COLUMN_KIND_FLOAT:
Expand All @@ -5523,6 +5522,7 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) {
value = VEC0_METADATA_OPERATOR_IN;
sqlite3_vtab_in(pIdxInfo, i, 1);
}
#endif
else {
value = VEC0_PARTITION_OPERATOR_EQ;
}
Expand Down

0 comments on commit 0123b24

Please sign in to comment.