fix(CORE/DBUpdater): Use stdin instead of -e SOURCE (#22949)

This commit is contained in:
arsinspace
2025-10-12 17:47:42 +03:00
committed by GitHub
parent c79289c4b8
commit 6261518ebf

View File

@@ -496,17 +496,13 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
if (ssl == "ssl")
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
if (!database.empty())
args.emplace_back(database);
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
"sql.updates", "", true);
"sql.updates", path.generic_string(), true);
if (ret != EXIT_SUCCESS)
{