[Pkg-owncloud-commits] [owncloud-client] 153/211: SyncJournalDB: Fix deleteBatch

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 d7ac878efd48d08ee71ba22f1f02b75240d8d6a0
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Oct 21 16:37:51 2014 +0200

    SyncJournalDB: Fix deleteBatch
---
 src/mirall/ownsql.cpp        | 3 +++
 src/mirall/syncjournaldb.cpp | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mirall/ownsql.cpp b/src/mirall/ownsql.cpp
index 5dac0a5..567c310 100644
--- a/src/mirall/ownsql.cpp
+++ b/src/mirall/ownsql.cpp
@@ -236,6 +236,9 @@ void SqlQuery::bindValue(int pos, const QVariant& value)
             break; }
         }
     }
+    if (res != SQLITE_OK) {
+        qDebug() << Q_FUNC_INFO << "ERROR" << value.toString() << res;
+    }
     Q_ASSERT( res == SQLITE_OK );
 }
 
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index f01491e..71b3e9d 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -667,6 +667,7 @@ static bool deleteBatch(SqlQuery & query, const QStringList & entries, const QSt
     qDebug() << "Removing stale " << qPrintable(name) << " entries: " << entries.join(", ");
     // FIXME: Was ported from execBatch, check if correct!
     foreach( const QString& entry, entries ) {
+        query.reset();
         query.bindValue(1, entry);
         if (!query.exec()) {
             QString err = query.error();
@@ -675,7 +676,8 @@ static bool deleteBatch(SqlQuery & query, const QStringList & entries, const QSt
             return false;
         }
     }
-    query.reset();
+    query.reset(); // viel hilft viel ;-)
+
     return true;
 }
 

-- 
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