mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DBLayer: escape MySQL keywords in page_text, page_text_locale, broadcast_text and broadcast_text_locale select queries
(cherry picked from commitd4f71131f0) (cherry picked from commitedcaac6c95)
This commit is contained in:
@@ -269,7 +269,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" FROM battlemaster_list_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// BroadcastText.db2
|
||||
PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT Text, Text1, ID, LanguageID, ConditionID, EmotesID, Flags, ChatBubbleDurationMs, "
|
||||
PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT `Text`, Text1, ID, LanguageID, ConditionID, EmotesID, Flags, ChatBubbleDurationMs, "
|
||||
"VoiceOverPriorityID, SoundKitID1, SoundKitID2, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3 FROM broadcast_text"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_BROADCAST_TEXT, "SELECT MAX(ID) + 1 FROM broadcast_text", CONNECTION_SYNCH);
|
||||
|
||||
@@ -6094,8 +6094,8 @@ void ObjectMgr::LoadPageTexts()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1 2 3 4
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, Text, NextPageID, PlayerConditionID, Flags FROM page_text");
|
||||
// 0 1 2 3 4
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, `Text`, NextPageID, PlayerConditionID, Flags FROM page_text");
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 page texts. DB table `page_text` is empty!");
|
||||
@@ -6142,8 +6142,8 @@ void ObjectMgr::LoadPageTextLocales()
|
||||
|
||||
_pageTextLocaleStore.clear(); // needed for reload case
|
||||
|
||||
// 0 1 2
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, locale, Text FROM page_text_locale");
|
||||
// 0 1 2
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, locale, `Text` FROM page_text_locale");
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user