Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make statement handle storage threadsafe
Connection objects retain a map of ongoing statements. With SQLite, one can use a single database handle to execute queries from many threads when it is in serialized mode (which is the default). This works out OK with SQLite itself, however the handling of the map of active statement handles was not threadsafe, and this could cause segfaults. This refactors how active statement handles are tracked to allow the insertion of locking, and then adds that locking.
- Loading branch information
Showing
3 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters