mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Make Mangos Four compatible with newer MySQL. Based by work by @leprasmurf
* Delimite SQL queries for MySQL 8 compatibility * Fix database name for PlayerDump
This commit is contained in:
parent
96e645a61d
commit
fbdc248ed1
57 changed files with 1017 additions and 972 deletions
|
|
@ -669,7 +669,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
|
|||
|
||||
// updated in DB
|
||||
std::ostringstream ss;
|
||||
ss << "INSERT INTO gameobject VALUES ( "
|
||||
ss << "INSERT INTO `gameobject` VALUES ( "
|
||||
<< GetGUIDLow() << ", "
|
||||
<< GetEntry() << ", "
|
||||
<< mapid << ", "
|
||||
|
|
@ -688,7 +688,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
|
|||
<< uint32(GetGoState()) << ")";
|
||||
|
||||
WorldDatabase.BeginTransaction();
|
||||
WorldDatabase.PExecuteLog("DELETE FROM gameobject WHERE guid = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM `gameobject` WHERE `guid` = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("%s", ss.str().c_str());
|
||||
WorldDatabase.CommitTransaction();
|
||||
}
|
||||
|
|
@ -778,9 +778,9 @@ void GameObject::DeleteFromDB()
|
|||
sMapPersistentStateMgr.DoForAllStatesWithMapId(GetMapId(), worker);
|
||||
|
||||
sObjectMgr.DeleteGOData(GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM gameobject WHERE guid = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM game_event_gameobject WHERE guid = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM gameobject_battleground WHERE guid = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM `gameobject` WHERE `guid` = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM `game_event_gameobject` WHERE `guid` = '%u'", GetGUIDLow());
|
||||
WorldDatabase.PExecuteLog("DELETE FROM `gameobject_battleground` WHERE `guid` = '%u'", GetGUIDLow());
|
||||
}
|
||||
|
||||
GameObjectInfo const* GameObject::GetGOInfo() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue