Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sqlcipher to 4.3.0. #18

Merged
merged 54 commits into from May 4, 2020
Merged

Update sqlcipher to 4.3.0. #18

merged 54 commits into from May 4, 2020

Conversation

xeodou
Copy link
Owner

@xeodou xeodou commented May 4, 2020

No description provided.

rittneje and others added 30 commits January 4, 2019 18:54
Added TestOpenContext
Added TestFileCopyTruncate
Added ping to doTestOpen
Updated Ping and doTestOpen. Added TestOpenContext and TestFileCopyTruncate
When building on darwin with the `libsqlite3` tag, go-sqlite3 adds the
homebrew library path.  It does not, however, add the homebrew include
path, which means that the MacOS sqlite3 header is used instead.  On
my system, this results in build errors that look like this:

./sqlite3_load_extension.go:25:8: could not determine kind of name for C.sqlite3_enable_load_extension
./sqlite3_load_extension.go:33:8: could not determine kind of name for C.sqlite3_load_extension

Add the homebrew include path as well, so that he header matches the
libraries we're using.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
darwin/libsqlite3: Also use the homebrew include path
[why]
Context cancellation goroutine is not in sync with Next() method lifetime.
It leads to sql.ErrNoRows instead of context.Canceled often (easy to reproduce).
It leads to interruption of next query executed on same connection (harder to reproduce).

[how]
Do query in goroutine, wait when interruption done.

[testing]
Add unit test that reproduces error cases.
[why]
see mattn/go-sqlite3#607

SQLite default journal mode is DELETE, but forcing it on open causes "database is locked"
if other connection exists with WAL mode, for example.

[how]
Don't set DELETE mode if not set in DSN explicitly.

[testing]
Run tests in my project where WAL mode is used.
tpounds and others added 23 commits October 7, 2019 10:46
Improve readability of Backup()
Add build constraints for non cgo
Fix context cancellation racy handling
* adding SystemErrno to Error, and fixing error logic when open fails

* fix for old versions of libsqlite3 that do not have sqlite3_system_errno defined

* fixing pre-processor logic
* feat: add go modules

* feat: upgrade goquery dependency
* report actual error message if sqlite3_load_extension fails

* more fixes and test cases

Co-authored-by: Jesse Rittner <jrittner@lutron.com>
Once the regex encountered the first instance of a non-match, it would return without processing the rest of the rows in the statement. This change allows it to process the remaining, only setting the sqlite3_result_int to zero then continuing. This worked fine for the example as it only had one item to process.
Repository owner deleted a comment from coveralls May 4, 2020
@xeodou xeodou merged commit 4bc9c65 into master May 4, 2020
@xeodou xeodou deleted the update branch May 4, 2020 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet