[Digikam-devel] [PATCH 1/5] Ensure that an error is returned if the query fails.
Richard Mortimer
richm at oldelvet.org.uk
Tue Nov 24 09:42:37 GMT 2015
This manifests itself during database conversion where the transfer of
a record fails but the conversion carries on to other entries. The
typical result is a cascaded set of failures and corrupt data.
---
libs/database/engine/dbenginebackend.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libs/database/engine/dbenginebackend.cpp b/libs/database/engine/dbenginebackend.cpp
index c5ea8fc..969786b 100644
--- a/libs/database/engine/dbenginebackend.cpp
+++ b/libs/database/engine/dbenginebackend.cpp
@@ -848,6 +848,8 @@ BdEngineBackend::QueryState BdEngineBackend::handleQueryResult(DbEngineSqlQuery&
if (query.lastError().type() == QSqlError::ConnectionError)
{
return BdEngineBackend::ConnectionError;
+ } else {
+ return BdEngineBackend::SQLError;
}
}
--
2.5.0
More information about the Digikam-devel
mailing list