tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
11.24k stars 286 forks source link

Vector search fix error handling #1637

Closed sivukhin closed 3 months ago

sivukhin commented 3 months ago

Context

In one part of the vector search code we relying on the SQLITE_CONSTRAINT but since by default we enable sqlite3_extended_result_codes - the real return code will be more detailed.

In order to fix this we need to compare lower bits of the error code: rc & 0xff