Skip to content
Permalink
Browse files
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.
  • Loading branch information
vaintroub committed Jun 6, 2021
1 parent cebc435 commit 9f9a925
Showing 1 changed file with 4 additions and 1 deletion.
@@ -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,

0 comments on commit 9f9a925

Please sign in to comment.