void DatabaseWorkerPool<T>::CommitTransaction(SQLTransaction transaction)
{
#ifdef TRINITY_DEBUG
	//! Only analyze transaction weaknesses in Debug mode.
	//! Ideally we catch the faults in Debug mode and then correct them,
	//! so there's no need to waste these CPU cycles in Release mode.
	switch (transaction->GetSize())
	{
	case 0:
		TC_LOG_DEBUG("sql.driver", "Transaction contains 0 queries. Not executing.");
		return;
	case 1:
		TC_LOG_DEBUG("sql.driver", "Warning: Transaction only holds 1 query, consider removing Transaction context in code.");
		break;
	default:
		break;
	}
#endif // TRINITY_DEBUG

	Enqueue(new TransactionTask(transaction));
}