-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SqlQuery: Write NULL when intended #4548
In SQLite bindings are not cleared by sqlite3_reset() calls, so skipping a sqlite3_bind call to create a NULL value doesn't work, instead the previous value will be written. To fix this, I clear all bindings in SqlQuery::reset and make sure to explicitly bind NULL when desired in SqlQuery::bind. To make sure there's no confusion about SqlQuery::reset and sqlite3_reset, I rename our method to reset_and_clear_bindings(). (cherry picked from commit 7bd4f95)
- Loading branch information
Showing
4 changed files
with
37 additions
and
37 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
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