From 6f25e618b5382aa88af8fcd35e1980e231cc622c Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 20 May 2013 13:42:18 +0200 Subject: [PATCH] * Don't retry on empty SQL error. --- src/libtomahawk/database/TomahawkSqlQuery.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/database/TomahawkSqlQuery.cpp b/src/libtomahawk/database/TomahawkSqlQuery.cpp index 2591b18b1..540e5dc76 100644 --- a/src/libtomahawk/database/TomahawkSqlQuery.cpp +++ b/src/libtomahawk/database/TomahawkSqlQuery.cpp @@ -127,7 +127,7 @@ TomahawkSqlQuery::commitTransaction() log = true; #endif if ( log ) - tLog( LOGSQL ) << "TomahawkSqlQuery::commitTransaction running in thread " << QThread::currentThread(); + tLog( LOGSQL ) << "TomahawkSqlQuery::commitTransaction running in thread" << QThread::currentThread(); unsigned int retries = 0; while ( !m_db.commit() && ++retries < 10 ) @@ -149,7 +149,8 @@ TomahawkSqlQuery::showError() tLog() << endl << "*** DATABASE ERROR ***" << endl << lastQuery() << endl << "boundValues:" << boundValues() << endl - << lastError().text() << endl; + << lastError().text() << endl + << lastError().databaseText() << endl; Q_ASSERT( false ); } @@ -160,5 +161,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( "locked" ) || text.contains( "busy" ) ); }