chore(MySQL): Deprecate 5.6 (#4070)

This commit is contained in:
Kitzunu
2021-01-03 03:14:06 +01:00
committed by GitHub
parent 79aa560654
commit f16aad0ad4
3 changed files with 5 additions and 13 deletions

2
conf/dist/config.sh vendored
View File

@@ -152,7 +152,7 @@ DB_SKIP_BASE_IMPORT_IF_EXISTS=true
#
# Example:
# "C:/Program Files/MySQL/MySQL Server 5.6/bin/mysql.exe"
# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
# "/usr/bin/mysql"
# "mysql"
#

View File

@@ -145,15 +145,12 @@ find_path(MYSQL_INCLUDE_DIR
/usr/local/mysql/include
"C:/Program Files/MySQL/MySQL Server 8.0/include"
"C:/Program Files/MySQL/MySQL Server 5.7/include"
"C:/Program Files/MySQL/MySQL Server 5.6/include"
"C:/Program Files/MySQL/include"
"C:/MySQL/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
"$ENV{ProgramFiles}/MySQL/*/include"
"$ENV{SystemDrive}/MySQL/*/include"
"c:/msys/local/include"
@@ -187,21 +184,16 @@ if( WIN32 )
"C:/Program Files/MySQL/MySQL Server 8.0/lib"
"C:/Program Files/MySQL/MySQL Server 8.0/lib/opt"
"C:/Program Files/MySQL/MySQL Server 5.7/lib/opt"
"C:/Program Files/MySQL/MySQL Server 5.6/lib/opt"
"C:/Program Files/MySQL/lib"
"C:/MySQL/lib/debug"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
"$ENV{ProgramFiles}/MySQL/*/lib/opt"
"$ENV{SystemDrive}/MySQL/*/lib/opt"
"c:/msys/local/include"

View File

@@ -7,8 +7,8 @@
#include "DatabaseWorkerPool.h"
#include "DatabaseEnv.h"
#define MIN_MYSQL_SERVER_VERSION 50600u
#define MIN_MYSQL_CLIENT_VERSION 50600u
#define MIN_MYSQL_SERVER_VERSION 50700u
#define MIN_MYSQL_CLIENT_VERSION 50700u
template <class T> DatabaseWorkerPool<T>::DatabaseWorkerPool() :
_mqueue(new ACE_Message_Queue<ACE_SYNCH>(2 * 1024 * 1024, 2 * 1024 * 1024)),
@@ -18,7 +18,7 @@ template <class T> DatabaseWorkerPool<T>::DatabaseWorkerPool() :
_connections.resize(IDX_SIZE);
WPFatal(mysql_thread_safe(), "Used MySQL library isn't thread-safe.");
WPFatal(mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION, "AzerothCore does not support MySQL versions below 5.6");
WPFatal(mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION, "AzerothCore does not support MySQL versions below 5.7");
}
template <class T>
@@ -37,7 +37,7 @@ bool DatabaseWorkerPool<T>::Open(const std::string& infoString, uint8 async_thre
T* t = new T(_queue, _connectionInfo);
res &= t->Open();
if (res) // only check mysql version if connection is valid
WPFatal(mysql_get_server_version(t->GetHandle()) >= MIN_MYSQL_SERVER_VERSION, "AzerothCore does not support MySQL versions below 5.6");
WPFatal(mysql_get_server_version(t->GetHandle()) >= MIN_MYSQL_SERVER_VERSION, "AzerothCore does not support MySQL versions below 5.7");
_connections[IDX_ASYNC][i] = t;
++_connectionCount[IDX_ASYNC];