summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-06-06 08:46:59 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-06-06 08:48:12 +0200
commit9f9a925c399b9d960f095be0886f56f51396eb04 (patch)
tree4fcea108bc420fd39c3addd835c545bb8916d1ae
parentcebc435592043a83d5f430aec8bdaa79cd7c1d44 (diff)
downloadmariadb-git-9f9a925c399b9d960f095be0886f56f51396eb04.tar.gz
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.
-rw-r--r--win/upgrade_wizard/upgradeDlg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/win/upgrade_wizard/upgradeDlg.cpp b/win/upgrade_wizard/upgradeDlg.cpp
index d996c0ebe5d..d0dd6a3fa75 100644
--- a/win/upgrade_wizard/upgradeDlg.cpp
+++ b/win/upgrade_wizard/upgradeDlg.cpp
@@ -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,