Bug #98796 mysql_upgrade tmpdir with whitespace lead to error

Submitted: 2 Mar 2020 7:01 Modified: 2 Mar 2020 11:22
Reporter: Sun Edward Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.6.30-enterprise-commercial-advanced fo, 5.6.47 OS:Windows
Assigned to: CPU Architecture:Any

[2 Mar 2020 7:01] Sun Edward
Description:
run the follow command to do mysql upgrade 
mysql_upgrade.exe --port=64031 --user=root --verbose --tmpdir="C:\Windows\Temp\test  test2" --debug=d:t:O,"C:\Windows\Temp\mysql_upgrade.trace"

will get error:
Looking for 'mysql.exe' as: C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysqlcheck.exe
The system cannot find the file specified.
The system cannot find the file specified.
Error: Failed while fetching Server version! Could be due to unauthorized access
.
FATAL ERROR: Upgrade failed

in the mysql_upgrade.trace I find command like 
""C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysql.exe" "--no-defaults" "--protocol=TCP" "--port=64031" "--user=root" "--user=root"  "--database=mysql" "--batch" "--skip-force" "--silent" < C:\Windows\Temp\test  test2\sqlEEE7.tmp 2>&1 "

is it caused my the path of sql file not quoted?

More seirous issue is change environment variable TMP with path with whitespace will also lead to mysql upgrade failure without --tmpdir parameters. This blocked our autostart program which need to set TMP path for other parent process of mysql upgrade.

How to repeat:
run mysql_upgrade.exe with --tmpdir in a path with whitespace.
[2 Mar 2020 11:22] MySQL Verification Team
Hello Sun Edward,

Thank you for the report.

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.