aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-07-27 01:00:37 +0200
committerShauren <shauren.trinity@gmail.com>2019-07-27 01:00:37 +0200
commite8e89f58fb800014f53341f12505f60ee2b5fb6f (patch)
tree2b63800163e2026be75621a36ddf1218bdbf9dab /src/server/database/Database/MySQLConnection.cpp
parent1dcbceba81002ba6ff83129d403763df398f9736 (diff)
Core/DBLayer: Prevent using prepared statements on wrong database
Diffstat (limited to 'src/server/database/Database/MySQLConnection.cpp')
-rw-r--r--src/server/database/Database/MySQLConnection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index 9f586739d4a..1d2286ede44 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -193,7 +193,7 @@ bool MySQLConnection::Execute(const char* sql)
return true;
}
-bool MySQLConnection::Execute(PreparedStatement* stmt)
+bool MySQLConnection::Execute(PreparedStatementBase* stmt)
{
if (!m_Mysql)
return false;
@@ -243,7 +243,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt)
}
}
-bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint64* pRowCount, uint32* pFieldCount)
+bool MySQLConnection::_Query(PreparedStatementBase* stmt, MYSQL_RES **pResult, uint64* pRowCount, uint32* pFieldCount)
{
if (!m_Mysql)
return false;
@@ -387,7 +387,7 @@ int MySQLConnection::ExecuteTransaction(SQLTransaction& transaction)
{
case SQL_ELEMENT_PREPARED:
{
- PreparedStatement* stmt = data.element.stmt;
+ PreparedStatementBase* stmt = data.element.stmt;
ASSERT(stmt);
if (!Execute(stmt))
{
@@ -490,7 +490,7 @@ void MySQLConnection::PrepareStatement(uint32 index, const char* sql, Connection
}
}
-PreparedResultSet* MySQLConnection::Query(PreparedStatement* stmt)
+PreparedResultSet* MySQLConnection::Query(PreparedStatementBase* stmt)
{
MYSQL_RES *result = NULL;
uint64 rowCount = 0;