Core/DBLayer: Prevent using prepared statements on wrong database

This commit is contained in:
Shauren
2019-07-27 01:00:37 +02:00
parent 1dcbceba81
commit e8e89f58fb
102 changed files with 604 additions and 577 deletions
+2 -2
View File
@@ -115,7 +115,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);
@@ -126,7 +126,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);