fix(CORE): revert to mysql -p argument.

A different and non deprecated approach should be used.
This commit is contained in:
Yehonal
2022-10-17 15:46:56 +00:00
parent a8d41010f5
commit 563596bc69

View File

@@ -447,6 +447,9 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
args.emplace_back("-h" + host);
args.emplace_back("-u" + user);
if (!password.empty())
args.emplace_back("-p" + password);
// Check if we want to connect through ip or socket (Unix only)
#ifdef _WIN32
@@ -498,8 +501,6 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
auto env = boost::process::environment();
if (!password.empty())
env["MYSQL_PWD"]=password;
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,