summaryrefslogtreecommitdiff
path: root/src/server/database/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorKitzunu <24550914+Kitzunu@users.noreply.github.com>2024-09-19 05:24:11 +0200
committerGitHub <noreply@github.com>2024-09-19 00:24:11 -0300
commitdbde182ecdcf3ebe392943c2b34adae1fdf00110 (patch)
tree565a2ff658b2cd108f3ce79fb3789ac11a5659ec /src/server/database/Database/MySQLConnection.cpp
parent5af3d2d650e4615aff39ccd1adf2a0c71962f084 (diff)
refactor(Deps/MySQL): Drop MariaDB and MySQL 5.7/8.1 and add MySQL 8.… (#19451)
Diffstat (limited to 'src/server/database/Database/MySQLConnection.cpp')
-rw-r--r--src/server/database/Database/MySQLConnection.cpp14
1 files changed, 2 insertions, 12 deletions
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<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))