Core/Database: Fixed WITH_COREDEBUG + WITH_DYNAMIC_LINKING incompatibility on windows
This commit is contained in:
@@ -51,6 +51,14 @@
|
||||
#define MIN_MARIADB_CLIENT_VERSION 30003u
|
||||
#define MIN_MARIADB_CLIENT_VERSION_STRING "3.0.3"
|
||||
|
||||
namespace
|
||||
{
|
||||
#ifdef TRINITY_DEBUG
|
||||
template<typename Database>
|
||||
thread_local bool WarnSyncQueries = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct DatabaseWorkerPool<T>::QueueSizeTracker
|
||||
{
|
||||
@@ -426,6 +434,14 @@ void DatabaseWorkerPool<T>::KeepAlive()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TRINITY_DEBUG
|
||||
template <class T>
|
||||
void DatabaseWorkerPool<T>::WarnAboutSyncQueries([[maybe_unused]] bool warn)
|
||||
{
|
||||
WarnSyncQueries<T> = warn;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
uint32 DatabaseWorkerPool<T>::OpenConnections(InternalIndex type, uint8 numConnections)
|
||||
{
|
||||
@@ -485,7 +501,7 @@ template <class T>
|
||||
T* DatabaseWorkerPool<T>::GetFreeConnection()
|
||||
{
|
||||
#ifdef TRINITY_DEBUG
|
||||
if (_warnSyncQueries)
|
||||
if (WarnSyncQueries<T>)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << boost::stacktrace::stacktrace();
|
||||
|
||||
Reference in New Issue
Block a user