diff options
author | Machiavelli <none@none> | 2010-09-05 10:34:46 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-09-05 10:34:46 +0200 |
commit | 1608ebf7bf1c82398fffc1b0ab782f36502b1905 (patch) | |
tree | c7060be6dcbbcc7c4ad58207e83b6d813f2dd609 /src/server/shared/Database/MySQLConnection.cpp | |
parent | f769e88f5c4f76e4f7ce98ccde3e9d3e007bd3c5 (diff) |
Core/DBLayer: Move some syncrhonisation error prone methods into the guarded scope in MySQLConnection:Execute(PreparedStatement*)
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.cpp')
-rw-r--r-- | src/server/shared/Database/MySQLConnection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 64b2cea5d4b..00777d29ac8 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -190,14 +190,14 @@ bool MySQLConnection::Execute(PreparedStatement* stmt) return false; uint32 index = stmt->m_index; - MySQLPreparedStatement* m_mStmt = GetPreparedStatement(index); - ASSERT(m_mStmt); // Can only be null if preparation failed, server side error or bad query - m_mStmt->m_stmt = stmt; // Cross reference them for debug output - stmt->m_stmt = m_mStmt; - { // guarded block for thread-safe mySQL request ACE_Guard<ACE_Thread_Mutex> query_connection_guard(m_Mutex); + + MySQLPreparedStatement* m_mStmt = GetPreparedStatement(index); + ASSERT(m_mStmt); // Can only be null if preparation failed, server side error or bad query + m_mStmt->m_stmt = stmt; // Cross reference them for debug output + stmt->m_stmt = m_mStmt; // TODO: Cleaner way stmt->BindParameters(); |