Core/DBLayer: Add an assert in TransactionTask::Execute to make sure valid queries are held
Core/Logging: Tiny cleanup in sLog.outSQLDriver --HG-- branch : trunk
This commit is contained in:
@@ -56,6 +56,7 @@ bool TransactionTask::Execute()
|
||||
while (!queries.empty())
|
||||
{
|
||||
sql = queries.front();
|
||||
ASSERT(sql);
|
||||
if (!m_conn->Execute(sql))
|
||||
{
|
||||
sLog.outSQLDriver("[Warning] Transaction aborted. %u queries not executed.", (uint32)queries.size());
|
||||
|
||||
@@ -547,16 +547,20 @@ void Log::outSQLDriver(const char* str, ...)
|
||||
va_end(ap);
|
||||
|
||||
printf("\n");
|
||||
|
||||
if (sqlLogFile)
|
||||
{
|
||||
outTimestamp(sqlLogFile);
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
vfprintf(sqlLogFile, str, ap);
|
||||
fprintf(sqlLogFile, "\n");
|
||||
va_end(ap);
|
||||
|
||||
fprintf(sqlLogFile, "\n");
|
||||
fflush(sqlLogFile);
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user