SyncEngine: Fix accidental re-discovery because of broken version table
authorMarkus Goetz <markus@woboq.com>
Tue, 5 May 2015 15:06:28 +0000 (17:06 +0200)
committerMarkus Goetz <markus@woboq.com>
Tue, 5 May 2015 15:07:13 +0000 (17:07 +0200)
Bug had been triggered by d63abef718ebab0717c496dca11a9ad363bf6965
Broken version table in there since some time it seems like.

src/libsync/syncjournaldb.cpp

index 2ff589a622c842a170abcd70a9721624e41b45ec..599c676100f0230fd5338fe7a88b86f00ebfddb6 100644 (file)
@@ -30,7 +30,7 @@
 namespace OCC {
 
 SyncJournalDb::SyncJournalDb(const QString& path, QObject *parent) :
-    QObject(parent), _transaction(0), _possibleUpgradeFromMirall_1_5(false)
+    QObject(parent), _transaction(0), _possibleUpgradeFromMirall_1_5(false), _possibleUpgradeFromMirall_1_8_0(false)
 {
 
     _dbFile = path;
@@ -286,7 +286,7 @@ bool SyncJournalDb::checkConnect()
         createQuery.bindValue(1, MIRALL_VERSION_MAJOR);
         createQuery.bindValue(2, MIRALL_VERSION_MINOR);
         createQuery.bindValue(3, MIRALL_VERSION_PATCH);
-        createQuery.bindValue(3, MIRALL_VERSION_BUILD);
+        createQuery.bindValue(4, MIRALL_VERSION_BUILD);
         createQuery.exec();
 
     } else {
@@ -295,6 +295,7 @@ bool SyncJournalDb::checkConnect()
         int patch = versionQuery.intValue(2);
 
         if( major == 1 && minor == 8 && patch  == 0 ) {
+            qDebug() << Q_FUNC_INFO << "_possibleUpgradeFromMirall_1_8_0 detected!";
             _possibleUpgradeFromMirall_1_8_0 = true;
         }
         // Not comparing the BUILD id here, correct?