aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2013-01-23 22:56:56 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2013-01-23 22:56:56 +0100
commit1c0239ea9873f1fbbaf6cf80bb3caf2d350a656a (patch)
tree6539409bb32a5ca6ed314c6c20982e7f9f07ba6c
parentf4de181db00bf323793e2121aac496588c3b9b33 (diff)
Core/DBLayer: Drop support for MySQL versions <5.1
Both server and client libraries must be up to date in order to run TC.
-rw-r--r--src/server/shared/Database/DatabaseWorkerPool.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index 34b7c5083e3..3df9436a4c4 100644
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
@@ -31,6 +31,9 @@
#include "QueryHolder.h"
#include "AdhocStatement.h"
+#define MIN_MYSQL_SERVER_VERSION 51000u
+#define MIN_MYSQL_CLIENT_VERSION 51000u
+
class PingOperation : public SQLOperation
{
//! Operation for idle delaythreads
@@ -53,6 +56,9 @@ class DatabaseWorkerPool
_connections.resize(IDX_SIZE);
WPFatal (mysql_thread_safe(), "Used MySQL library isn't thread-safe.");
+ WPFatal (mysql_get_server_version() >= MIN_MYSQL_SERVER_VERSION &&
+ mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION,
+ "TrinityCore does not support MySQL versions below 5.1");
}
~DatabaseWorkerPool()