[Digikam-devel] [PATCH 2/5] Delete tables in reverse creation order.
Richard Mortimer
richm at oldelvet.org.uk
Tue Nov 24 09:42:38 GMT 2015
---
libs/database/coredb/coredbcopymanager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/database/coredb/coredbcopymanager.cpp b/libs/database/coredb/coredbcopymanager.cpp
index 7568126..8cbba79 100644
--- a/libs/database/coredb/coredbcopymanager.cpp
+++ b/libs/database/coredb/coredbcopymanager.cpp
@@ -110,7 +110,7 @@ void CoreDbCopyManager::copyDatabases(const DbEngineParameters& fromDBParameters
QMap<QString, QVariant> bindingMap;
// Delete all tables
- for (int i=0; m_isStopProcessing || i < tablesSize; ++i)
+ for (int i=(tablesSize - 1); m_isStopProcessing || i >= 0; --i)
{
if (toDBbackend.execDirectSql(QString::fromUtf8("DROP TABLE IF EXISTS %1;").arg(tables[i])) != BdEngineBackend::NoErrors)
{
--
2.5.0
More information about the Digikam-devel
mailing list