From 8f19bcddf48cdc52674e77df6837f81ccabf4517 Mon Sep 17 00:00:00 2001 From: M'Dic Date: Tue, 1 Nov 2022 19:00:42 -0400 Subject: [PATCH] Add (core\logging): Log sync db queries in mapupdater (#13638) This will Log sync db queries in World::Update() loop for the mapupdater when building in debug. Originally part of TC Commit https://github.com/TrinityCore/TrinityCore/pull/25174 Apparently azerothcore never cherrypicked it entirely for whatever reason and is needed when running a debugger in debug build for me to find and address some recent crash issues that been posted on the issues to fully verify the issue. Co-Authored-By: Giacomo Pozzoni --- src/server/game/Maps/MapUpdater.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp index 0c1fde4ae..164c70d85 100644 --- a/src/server/game/Maps/MapUpdater.cpp +++ b/src/server/game/Maps/MapUpdater.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "MapUpdater.h" +#include "DatabaseEnv.h" #include "LFGMgr.h" #include "Map.h" +#include "MapUpdater.h" #include "Metric.h" class UpdateRequest @@ -140,6 +141,10 @@ void MapUpdater::update_finished() void MapUpdater::WorkerThread() { + LoginDatabase.WarnAboutSyncQueries(true); + CharacterDatabase.WarnAboutSyncQueries(true); + WorldDatabase.WarnAboutSyncQueries(true); + while (1) { UpdateRequest* request = nullptr;