Core/DBLayer: Prevent using prepared statements on wrong database

This commit is contained in:
Shauren authored and Ovahlord committed 2020-04-15 19:18:58 +02:00
1 parent eaee7b3cfa
commit d003ebd8e4
98 files changed
+569 -541

No files matched your search

+2 -2
View File
@@ -105,7 +105,7 @@ public:
{
if (channel)
channel->SetOwnership(true);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP);
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP);
stmt->setUInt8 (0, 1);
stmt->setString(1, channelStr);
CharacterDatabase.Execute(stmt);
@@ -115,7 +115,7 @@ public:
{
if (channel)
channel->SetOwnership(false);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP);
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_OWNERSHIP);
stmt->setUInt8 (0, 0);
stmt->setString(1, channelStr);
CharacterDatabase.Execute(stmt);