[Pkg-owncloud-commits] [owncloud-client] 152/211: SyncJournalDB: Fix version table filling up
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit e5a0db878274e9061177d94d486367892ed9d0ef
Author: Markus Goetz <markus at woboq.com>
Date: Tue Oct 21 16:37:39 2014 +0200
SyncJournalDB: Fix version table filling up
---
src/mirall/syncjournaldb.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index 71ba1a9..f01491e 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -239,6 +239,12 @@ bool SyncJournalDb::checkConnect()
if (!versionQuery.next()) {
// If there was no entry in the table, it means we are likely upgrading from 1.5
_possibleUpgradeFromMirall_1_5 = true;
+ } else {
+ // Delete the existing entry so we can replace it by the new one
+ createQuery.prepare("DELETE FROM version;");
+ if (!createQuery.exec()) {
+ return sqlFail("Remove version", createQuery);
+ }
}
createQuery.prepare("INSERT OR REPLACE INTO version (major, minor, patch) VALUES ( ?1, ?2 , ?3 );");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list