aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-09-05 10:34:46 +0200
committerMachiavelli <none@none>2010-09-05 10:34:46 +0200
commit1608ebf7bf1c82398fffc1b0ab782f36502b1905 (patch)
treec7060be6dcbbcc7c4ad58207e83b6d813f2dd609 /src
parentf769e88f5c4f76e4f7ce98ccde3e9d3e007bd3c5 (diff)
Core/DBLayer: Move some syncrhonisation error prone methods into the guarded scope in MySQLConnection:Execute(PreparedStatement*)
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/shared/Database/MySQLConnection.cpp10
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();