fix(Core/DBUpdater): MySQL 8.0 + SSL support (#9340)

* cherry-pick commit (57617e215b)

Co-Authored-By: kvolk2git <78740198+kvolk2git@users.noreply.github.com>

Co-authored-by: kvolk2git <78740198+kvolk2git@users.noreply.github.com>
This commit is contained in:
Kitzunu
2021-11-26 13:10:34 +01:00
committed by GitHub
parent 120ee25a19
commit 077a36ead1

View File

@@ -478,9 +478,18 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
// Set max allowed packet to 1 GB
args.emplace_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.emplace_back("--ssl");
#endif
// Database
if (!database.empty())
args.emplace_back(database);