Core/DBUpdater: Fixed db auto updater for mysql 8 when ssl connections are enabled (#27298)

(cherry picked from commit 57617e215b)
This commit is contained in:
kvolk2git
2021-11-21 01:03:20 +03:00
committed by Shauren
parent 3b4a2a0a94
commit 285e3a1ed2

View File

@@ -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);