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 <giacomopoz@gmail.com>
This commit is contained in:
M'Dic 2022-11-01 19:00:42 -04:00 committed by GitHub
parent 6da780278a
commit 8f19bcddf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,9 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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;