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

Fix vacuum #214

Merged
merged 7 commits into from
Mar 26, 2015
Merged

Fix vacuum #214

merged 7 commits into from
Mar 26, 2015

Conversation

niik
Copy link
Member

@niik niik commented Mar 26, 2015

Vacuum is broken in Akavache.Sqlite3 most likely going back to 4.0.0. There's two issues at play.

One is that you can't have multiple statements in a prepared statement so the VACUUM statement was never been executed, only the DELETE. Second, the VACUUM statement can't be run within a transaction which is a problem since Akavache wraps everything in a transaction.

This is a first PoC solution which splits the vacuum operation into two statements that are run sequentially. Because of the transaction limitation we commit the transaction right the vacuum and then start it up again after. This will very likely have unintended side-effects but it's a proof that this is what's going on.

niik added 7 commits March 26, 2015 06:13
You can't have multiple statements in a prepared statement so the vacuum
command was never been executed. This splits it into two statements that
are run sequentially. Problem number two is that the vacuum command
can't be run in a transaction[1] so we commit the transaction right
before the vacuum and then start it up again after. This will very
likely have unintended side-effects but it's a proof that this is what's
going on.

1. https://sqlite.org/lang_vacuum.html
@niik
Copy link
Member Author

niik commented Mar 26, 2015

@paulcbetts How does this look to you?

@niik niik changed the title [WIP] Fix vacuum Fix vacuum Mar 26, 2015
@anaisbetts
Copy link
Member

👍, into it

anaisbetts added a commit that referenced this pull request Mar 26, 2015
@anaisbetts anaisbetts merged commit c2b4f1c into master Mar 26, 2015
@anaisbetts anaisbetts deleted the fix-vacuum branch March 26, 2015 16:45
@ghuntley ghuntley modified the milestone: 5.0.0 Nov 4, 2016
@ghuntley ghuntley added the Bug label Nov 4, 2016
@ghuntley ghuntley modified the milestone: 5.0.0 Nov 4, 2016
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants