mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
This PR addresses two related issues in the SQLite3 C API implementation: 1. Properly sets error codes on the database object when handling SQL preparation failures 2. Fixes C string handling in sqlite3_errstr_impl to ensure proper null- termination Error codes should be correctly set on the database object, making them accessible to API consumers. Also fixes and issue where C strings weren't properly null-terminated in error reporting functions, which causes the issue in #2197 where messages all get pushed onto a single line. Its possible that this also fixes a buffer overflow, but I'm not actually sure what the behavior was. Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #2212