From dbde182ecdcf3ebe392943c2b34adae1fdf00110 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 19 Sep 2024 05:24:11 +0200 Subject: refactor(Deps/MySQL): Drop MariaDB and MySQL 5.7/8.1 and add MySQL 8.… (#19451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/database/Database/MySQLConnection.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/server/database/Database/MySQLConnection.cpp') diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp index 54c393c75b..7303ea82fa 100644 --- a/src/server/database/Database/MySQLConnection.cpp +++ b/src/server/database/Database/MySQLConnection.cpp @@ -130,7 +130,6 @@ uint32 MySQLConnection::Open() if (m_connectionInfo.ssl != "") { -#if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80000 mysql_ssl_mode opt_use_ssl = SSL_MODE_DISABLED; if (m_connectionInfo.ssl == "ssl") { @@ -138,15 +137,6 @@ uint32 MySQLConnection::Open() } mysql_options(mysqlInit, MYSQL_OPT_SSL_MODE, (char const*)&opt_use_ssl); -#else - MySQLBool opt_use_ssl = MySQLBool(0); - if (m_connectionInfo.ssl == "ssl") - { - opt_use_ssl = MySQLBool(1); - } - - mysql_options(mysqlInit, MYSQL_OPT_SSL_ENFORCE, (char const*)&opt_use_ssl); -#endif } m_Mysql = reinterpret_cast(mysql_real_connect(mysqlInit, m_connectionInfo.host.c_str(), m_connectionInfo.user.c_str(), @@ -227,7 +217,7 @@ bool MySQLConnection::Execute(PreparedStatementBase* stmt) uint32 _s = getMSTime(); -#if !defined(MARIADB_VERSION_ID) && (MYSQL_VERSION_ID >= 80300) +#if MYSQL_VERSION_ID >= 80300 if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) #else if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) @@ -279,7 +269,7 @@ bool MySQLConnection::_Query(PreparedStatementBase* stmt, MySQLPreparedStatement uint32 _s = getMSTime(); -#if !defined(MARIADB_VERSION_ID) && (MYSQL_VERSION_ID >= 80300) +#if MYSQL_VERSION_ID >= 80300 if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) #else if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) -- cgit v1.2.3