1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 23:26:40 +02:00

* Don't retry on empty SQL error.

This commit is contained in:
Christian Muehlhaeuser
2013-05-20 13:42:18 +02:00
parent 0fa3b5c1b1
commit 6f25e618b5

View File

@@ -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" ) );
}