mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Query): Escape MySQL 8.0 Keyword (#3052)
This commit is contained in:
@@ -94,7 +94,7 @@ void GroupMgr::LoadGroups()
|
||||
CharacterDatabase.DirectExecute("DELETE FROM `groups` WHERE leaderGuid NOT IN (SELECT guid FROM characters)");
|
||||
// Delete all groups with less than 2 members (or less than 1 for lfg groups)
|
||||
// TODO: This query is not allowed in MySQL 8.0
|
||||
CharacterDatabase.DirectExecute("DELETE groups FROM `groups` LEFT JOIN ((SELECT guid, count(*) as cnt FROM group_member GROUP BY guid) t) ON groups.guid = t.guid WHERE t.guid IS NULL OR (t.cnt<=1 AND groups.groupType <> 12)");
|
||||
CharacterDatabase.DirectExecute("DELETE `groups` FROM `groups` LEFT JOIN ((SELECT guid, count(*) as cnt FROM group_member GROUP BY guid) t) ON groups.guid = t.guid WHERE t.guid IS NULL OR (t.cnt<=1 AND groups.groupType <> 12)");
|
||||
// Delete invalid lfg_data
|
||||
// TODO: This query is not allowed in MySQL 8.0
|
||||
CharacterDatabase.DirectExecute("DELETE lfg_data FROM lfg_data LEFT JOIN `groups` ON lfg_data.guid = groups.guid WHERE groups.guid IS NULL OR groups.groupType <> 12");
|
||||
|
||||
Reference in New Issue
Block a user