aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaMaex <damaex@live.de>2022-06-23 13:53:51 +0200
committerGitHub <noreply@github.com>2022-06-23 13:53:51 +0200
commitf922a7dff644451a05a6b0088b652fbe86dafebc (patch)
tree1b88d995ae79dae9154c393371c53e8b6941c5cd
parent3808e614d9760a2588fec0c1b0b4c30feda36dcc (diff)
Fixed MariaDB build the easy way for the client version check (#28039)
depending on https://jira.mariadb.org/browse/CONC-509
-rw-r--r--src/server/database/Database/DatabaseWorkerPool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp
index 125cfa4ee52..8c5aa283668 100644
--- a/src/server/database/Database/DatabaseWorkerPool.cpp
+++ b/src/server/database/Database/DatabaseWorkerPool.cpp
@@ -65,12 +65,12 @@ DatabaseWorkerPool<T>::DatabaseWorkerPool()
{
WPFatal(mysql_thread_safe(), "Used MySQL library isn't thread-safe.");
-#ifndef LIBMARIADB
- WPFatal(mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION, "TrinityCore does not support MySQL versions below " MIN_MYSQL_CLIENT_VERSION_STRING " (found %s id %lu, need id >= %u), please update your MySQL client library", mysql_get_client_info(), mysql_get_client_version(), MIN_MYSQL_CLIENT_VERSION);
- WPFatal(mysql_get_client_version() == MYSQL_VERSION_ID, "Used MySQL library version (%s id %lu) does not match the version id used to compile TrinityCore (id %u). Search on forum for TCE00011.", mysql_get_client_info(), mysql_get_client_version(), MYSQL_VERSION_ID);
-#else
+#if defined(LIBMARIADB) && MARIADB_PACKAGE_VERSION_ID >= 30200
WPFatal(mysql_get_client_version() >= MIN_MARIADB_CLIENT_VERSION, "TrinityCore does not support MariaDB versions below " MIN_MARIADB_CLIENT_VERSION_STRING " (found %s id %lu, need id >= %u), please update your MariaDB client library", mysql_get_client_info(), mysql_get_client_version(), MIN_MARIADB_CLIENT_VERSION);
WPFatal(mysql_get_client_version() == MARIADB_PACKAGE_VERSION_ID, "Used MariaDB library version (%s id %lu) does not match the version id used to compile TrinityCore (id %u). Search on forum for TCE00011.", mysql_get_client_info(), mysql_get_client_version(), MARIADB_PACKAGE_VERSION_ID);
+#else
+ WPFatal(mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION, "TrinityCore does not support MySQL versions below " MIN_MYSQL_CLIENT_VERSION_STRING " (found %s id %lu, need id >= %u), please update your MySQL client library", mysql_get_client_info(), mysql_get_client_version(), MIN_MYSQL_CLIENT_VERSION);
+ WPFatal(mysql_get_client_version() == MYSQL_VERSION_ID, "Used MySQL library version (%s id %lu) does not match the version id used to compile TrinityCore (id %u). Search on forum for TCE00011.", mysql_get_client_info(), mysql_get_client_version(), MYSQL_VERSION_ID);
#endif
}