From b53a9b6d6759d50237392247676582af4c1978eb Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 20 Jun 2012 23:24:44 +0200 Subject: [PATCH] * Keep retrying when error indicates a pragma query. --- src/libtomahawk/database/TomahawkSqlQuery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/database/TomahawkSqlQuery.cpp b/src/libtomahawk/database/TomahawkSqlQuery.cpp index ff4364673..951f5beeb 100644 --- a/src/libtomahawk/database/TomahawkSqlQuery.cpp +++ b/src/libtomahawk/database/TomahawkSqlQuery.cpp @@ -102,7 +102,7 @@ TomahawkSqlQuery::commitTransaction() if ( isBusyError( lastError() ) ) retries = 0; - tDebug() << "INFO: Retrying failed commit:" << retries << lastQuery() << lastError().text(); + tDebug() << "INFO: Retrying failed commit:" << retries << lastError().text(); TomahawkUtils::msleep( 10 ); } @@ -127,5 +127,5 @@ TomahawkSqlQuery::isBusyError( const QSqlError& error ) const { const QString text = error.text().trimmed().toLower(); - return ( text.contains( "locked" ) || text.contains( "busy" ) || text.isEmpty() ); + return ( text.contains( "no query" ) || text.contains( "locked" ) || text.contains( "busy" ) || text.isEmpty() ); }