mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/DB Layer: - Fix "Thread #1 unlocked a not-locked lock at 0x6D56E90" helgrind error (thanks to Aokromes for logs). Cause was unlocking MySQL connection on shutdown, but concurrent access at this point is not required.
- Remove redundant locking in PingOperation. Since these are delayed to async threads with their own MySQL connection, no concurrent access here either. - Codestyle cleanup - Documentation refining
This commit is contained in:
@@ -58,17 +58,13 @@ MySQLConnection::~MySQLConnection()
|
||||
{
|
||||
ASSERT (m_Mysql); /// MySQL context must be present at this point
|
||||
|
||||
sLog->outSQLDriver("MySQLConnection::~MySQLConnection()");
|
||||
for (size_t i = 0; i < m_stmts.size(); ++i)
|
||||
delete m_stmts[i];
|
||||
|
||||
for (PreparedStatementMap::const_iterator itr = m_queries.begin(); itr != m_queries.end(); ++itr)
|
||||
{
|
||||
free((void *)m_queries[itr->first].first);
|
||||
}
|
||||
|
||||
mysql_close(m_Mysql);
|
||||
Unlock(); /// Unlock while we die, how ironic
|
||||
}
|
||||
|
||||
void MySQLConnection::Close()
|
||||
|
||||
Reference in New Issue
Block a user