aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-07-14 12:06:43 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-16 00:54:53 +0100
commit58fb2ef631e17686981c97b22693e141beafecd3 (patch)
tree78750c39d1b716bbabcfd3e04454d1e858beb495 /src/server/database/Database/MySQLConnection.cpp
parente7b94603f256386eae8a9724c830d37593c0f0e1 (diff)
Core/DB: Improved terrible assertion message
(cherry picked from commit eed92676858c9c10b1bd570894d562b21e72a905)
Diffstat (limited to 'src/server/database/Database/MySQLConnection.cpp')
-rw-r--r--src/server/database/Database/MySQLConnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index 32c10725e2f..b72b4a15453 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -450,7 +450,8 @@ uint32 MySQLConnection::GetServerVersion() const
MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index)
{
- ASSERT(index < m_stmts.size());
+ ASSERT(index < m_stmts.size(), "Tried to access invalid prepared statement index %u (max index " SZFMTD ") on database `%s`, connection type: %s",
+ index, m_stmts.size(), m_connectionInfo.database.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
MySQLPreparedStatement* ret = m_stmts[index].get();
if (!ret)
TC_LOG_ERROR("sql.sql", "Could not fetch prepared statement %u on database `%s`, connection type: %s.",