refactor(Deps/MySQL): Drop MariaDB and MySQL 5.7/8.1 and add MySQL 8.… (#19451)

This commit is contained in:
Kitzunu
2024-09-19 05:24:11 +02:00
committed by GitHub
parent 5af3d2d650
commit dbde182ecd
12 changed files with 37 additions and 204 deletions

View File

@@ -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<MySQLHandle*>(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))