aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkvolk2git <78740198+kvolk2git@users.noreply.github.com>2021-11-21 01:03:20 +0300
committerShauren <shauren.trinity@gmail.com>2022-01-01 01:11:58 +0100
commit285e3a1ed22d40ccf6fe09be7d760725c2b8eefb (patch)
tree888bca8ff828b2c0245eeea7d0c3f2527c6ad516
parent3b4a2a0a94b748478fafec155a343afa8f652fb5 (diff)
Core/DBUpdater: Fixed db auto updater for mysql 8 when ssl connections are enabled (#27298)
(cherry picked from commit 57617e215b2f45ba1636e0002714792326c3e57c)
-rw-r--r--src/server/database/Updater/DBUpdater.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp
index 61b82e91099..3c5cca95a05 100644
--- a/src/server/database/Updater/DBUpdater.cpp
+++ b/src/server/database/Updater/DBUpdater.cpp
@@ -405,9 +405,18 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
// Set max allowed packet to 1 GB
args.push_back("--max-allowed-packet=1GB");
+#if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80000
+
+ if (ssl == "ssl")
+ args.emplace_back("--ssl-mode=REQUIRED");
+
+#else
+
if (ssl == "ssl")
args.push_back("--ssl");
+#endif
+
// Database
if (!database.empty())
args.push_back(database);