mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(CORE/DBUpdater): Use stdin instead of -e SOURCE (#22949)
This commit is contained in:
@@ -496,17 +496,13 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
|||||||
if (ssl == "ssl")
|
if (ssl == "ssl")
|
||||||
args.emplace_back("--ssl-mode=REQUIRED");
|
args.emplace_back("--ssl-mode=REQUIRED");
|
||||||
|
|
||||||
// Execute sql file
|
|
||||||
args.emplace_back("-e");
|
|
||||||
args.emplace_back(Acore::StringFormat("BEGIN; SOURCE {}; COMMIT;", path.generic_string()));
|
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
if (!database.empty())
|
if (!database.empty())
|
||||||
args.emplace_back(database);
|
args.emplace_back(database);
|
||||||
|
|
||||||
// Invokes a mysql process which doesn't leak credentials to logs
|
// Invokes a mysql process which doesn't leak credentials to logs
|
||||||
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
||||||
"sql.updates", "", true);
|
"sql.updates", path.generic_string(), true);
|
||||||
|
|
||||||
if (ret != EXIT_SUCCESS)
|
if (ret != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user