Commit 9f9a925c authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-23815 Windows : mysql_upgrade_wizard fails, if service name has spaces

The fix is to quote service name parameter, when it is passed to
mysql_upgrade_service subprocess.
parent cebc4355
......@@ -367,7 +367,10 @@ void CUpgradeDlg::UpgradeOneService(const string& servicename)
ErrorExit("Stdout SetHandleInformation");
string commandline("mysql_upgrade_service.exe --service=");
commandline += "\"";
commandline += servicename;
commandline += "\"";
si.cb = sizeof(si);
si.hStdInput= GetStdHandle(STD_INPUT_HANDLE);
si.hStdOutput= hPipeWrite;
......@@ -397,7 +400,7 @@ void CUpgradeDlg::UpgradeOneService(const string& servicename)
else
{
/*
Creating a process with CREATE_BREAKAWAY_FROM_JOB, reset this flag
Creating a process with CREATE_BREAKAWAY_FROM_JOB failed, reset this flag
and retry.
*/
if (!CreateProcess(NULL, (LPSTR)commandline.c_str(), NULL, NULL, TRUE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment