SQL seems fine as well, let's gooo

This commit is contained in:
FALL1N1
2020-11-11 02:15:37 +02:00
parent 1953e3f593
commit b1750da58d

View File

@@ -18,8 +18,7 @@ DatabaseWorkerPool<T>::DatabaseWorkerPool() :
memset(_connectionCount, 0, sizeof(_connectionCount));
_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_thread_safe(), "Used MySQL library isn't thread-safe.");
}
template <class T>
@@ -36,9 +35,7 @@ bool DatabaseWorkerPool<T>::Open(const std::string& infoString, uint8 async_thre
for (uint8 i = 0; i < async_threads; ++i)
{
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");
res &= t->Open();
_connections[IDX_ASYNC][i] = t;
++_connectionCount[IDX_ASYNC];