Fix missing MySQL ssl mode flag

This commit is contained in:
2026-01-25 22:41:43 +01:00
parent b0e15d389c
commit 1e8e7691b9

View File

@@ -129,13 +129,13 @@ uint32 MySQLConnection::Open()
if (m_connectionInfo.ssl != "") if (m_connectionInfo.ssl != "")
{ {
mysql_ssl_mode opt_use_ssl = SSL_MODE_DISABLED; // mysql_ssl_mode opt_use_ssl = SSL_MODE_DISABLED;
if (m_connectionInfo.ssl == "ssl") if (m_connectionInfo.ssl == "ssl")
{ {
opt_use_ssl = SSL_MODE_REQUIRED; // opt_use_ssl = SSL_MODE_REQUIRED;
} }
mysql_options(mysqlInit, MYSQL_OPT_SSL_MODE, (char const*)&opt_use_ssl); // mysql_options(mysqlInit, MYSQL_OPT_SSL_MODE, (char const*)&opt_use_ssl);
} }
m_Mysql = reinterpret_cast<MySQLHandle*>(mysql_real_connect(mysqlInit, m_connectionInfo.host.c_str(), m_connectionInfo.user.c_str(), m_Mysql = reinterpret_cast<MySQLHandle*>(mysql_real_connect(mysqlInit, m_connectionInfo.host.c_str(), m_connectionInfo.user.c_str(),
@@ -216,7 +216,7 @@ bool MySQLConnection::Execute(PreparedStatementBase* stmt)
uint32 _s = getMSTime(); uint32 _s = getMSTime();
#if MYSQL_VERSION_ID >= 80300 #if 0 // MYSQL_VERSION_ID >= 80300
if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr))
#else #else
if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) if (mysql_stmt_bind_param(msql_STMT, msql_BIND))
@@ -268,7 +268,7 @@ bool MySQLConnection::_Query(PreparedStatementBase* stmt, MySQLPreparedStatement
uint32 _s = getMSTime(); uint32 _s = getMSTime();
#if MYSQL_VERSION_ID >= 80300 #if 0 // MYSQL_VERSION_ID >= 80300
if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr))
#else #else
if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) if (mysql_stmt_bind_param(msql_STMT, msql_BIND))