mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00

* sqlite: use Arc instead of Copy-able StatementHandle This guarantees that StatementHandle is never used after calling `sqlite3_finalize`. Now `sqlite3_finalize` is only called when StatementHandle is dropped. (cherry picked from commit 5eebc05dc371512bae14cf94498087bdadeddec0) * sqlite: use Weak poiter to StatementHandle in the worker Otherwise some tests fail to close connection. (cherry picked from commit 5461eeeee30772e54e8874f60805b04bdc989278) * Fix segfault due to race condition in sqlite (#1300) (cherry picked from commit bb62cf767e3e44896bf4607da8e18237241ed170) * fix(sqlite): run `sqlite3_reset()` in `StatementWorker` this avoids possible race conditions without using a mutex * fix(sqlite): have `StatementWorker` keep a strong ref to `ConnectionHandle` this should prevent the database handle from being finalized before all statement handles have been finalized * fix(sqlite/test): make `concurrent_resets_dont_segfault` runtime-agnostic Co-authored-by: link2xt <link2xt@testrun.org> Co-authored-by: Adam Cigánek <adam.ciganek@gmail.com>
36 KiB
36 KiB