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:
Machiavelli
2012-03-27 11:49:16 +02:00
parent 13e071195d
commit 88d81d27cf
2 changed files with 92 additions and 82 deletions

View File

@@ -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()