diff options
| author | Shauren <shauren.trinity@gmail.com> | 2019-07-27 01:00:37 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2019-07-27 01:00:37 +0200 |
| commit | e8e89f58fb800014f53341f12505f60ee2b5fb6f (patch) | |
| tree | 2b63800163e2026be75621a36ddf1218bdbf9dab /src/server/shared | |
| parent | 1dcbceba81002ba6ff83129d403763df398f9736 (diff) | |
Core/DBLayer: Prevent using prepared statements on wrong database
Diffstat (limited to 'src/server/shared')
| -rw-r--r-- | src/server/shared/DataStores/DB2DatabaseLoader.cpp | 2 | ||||
| -rw-r--r-- | src/server/shared/Realm/RealmList.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/shared/DataStores/DB2DatabaseLoader.cpp b/src/server/shared/DataStores/DB2DatabaseLoader.cpp index 7af370d418f..bf6d90fcbc5 100644 --- a/src/server/shared/DataStores/DB2DatabaseLoader.cpp +++ b/src/server/shared/DataStores/DB2DatabaseLoader.cpp @@ -202,7 +202,7 @@ char* DB2DatabaseLoader::Load(uint32& records, char**& indexTable, char*& string void DB2DatabaseLoader::LoadStrings(uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool) { - PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + 1)); + HotfixDatabasePreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo->Statement + 1)); stmt->setString(0, localeNames[locale]); PreparedQueryResult result = HotfixDatabase.Query(stmt); if (!result) diff --git a/src/server/shared/Realm/RealmList.cpp b/src/server/shared/Realm/RealmList.cpp index 9babd0eeec1..4d6b6def7bf 100644 --- a/src/server/shared/Realm/RealmList.cpp +++ b/src/server/shared/Realm/RealmList.cpp @@ -95,7 +95,7 @@ void RealmList::UpdateRealms(boost::system::error_code const& error) TC_LOG_DEBUG("realmlist", "Updating Realm List..."); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); + LoginDatabasePreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); PreparedQueryResult result = LoginDatabase.Query(stmt); std::map<Battlenet::RealmHandle, std::string> existingRealms; @@ -403,7 +403,7 @@ uint32 RealmList::JoinRealm(uint32 realmAddress, uint32 build, boost::asio::ip:: memcpy(&keyData[0], clientSecret.data(), 32); memcpy(&keyData[32], serverSecret.AsByteArray(32).get(), 32); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_BNET_GAME_ACCOUNT_LOGIN_INFO); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_BNET_GAME_ACCOUNT_LOGIN_INFO); stmt->setString(0, ByteArrayToHexStr(keyData.data(), keyData.size())); stmt->setString(1, clientAddress.to_string()); stmt->setUInt8(2, locale); |
