SQLite Forum

Discovered bug in xBestIndex of virtual tables
Login
I just tested all four examples with the new check-in, and everything seems to be working as expected now. All four examples now report two constraints: `foo`, `bar` (in that order).

I did notice that if  you change `bar = foo` to `foo = bar` (shown below), you get three constraints: `foo`, `foo`, `bar` (in that order). But I think that's completely fine.

```
SELECT * FROM vtab WHERE foo = ? AND foo = bar
```

Thanks for fixing this!