Bug #22134 | Backup/restore exit code 0 after a failure to find a file | ||
---|---|---|---|
Submitted: | 9 Sep 2006 0:11 | Modified: | 20 Sep 2006 14:51 |
Reporter: | Brendan McKeown | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.0, 4.1 | OS: | Windows (Windows XP) |
Assigned to: | Iggy Galarza | CPU Architecture: | Any |
[9 Sep 2006 0:11]
Brendan McKeown
[11 Sep 2006 15:12]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described, also with mysqldump 10.10 from MySQL 5.0.x on Windows XP.
[20 Sep 2006 14:51]
Iggy Galarza
I was able to reproduce the problem as described using the cmd.exe shell. However, I was not able to reproduce the problem on the same machine with the same binaries using the CygWin bash shell. To be certain that this behaviour had nothing to do with MySQL, I wrote an MFC32 command-line application(return_el.exe) that always returns an ERRORLEVEL of 1 and was able to reproduce the problem with cmd.exe. As you can see from this comparison, when using cmd.exe and syntax like "command" > "Not Present File", the ERRORLEVEL equals 0 regardless of the ERRORLEVEL set by the "command". cmd.exe shell C:\src\return_el\Debug>echo %ERRORLEVEL% 0 C:\src\return_el\Debug>return_el.exe C:\src\return_el\Debug>echo %ERRORLEVEL% 1 C:\src\return_el\Debug>.\return_el.exe > c:\notpresent\data.dat The system cannot find the path specified. C:\src\return_el\Debug>echo %ERRORLEVEL% 0 CygWin Shell iggy@Area51 /cygdrive/c/src/return_el/Debug $ echo $? 0 iggy@Area51 /cygdrive/c/src/return_el/Debug $ ./return_el.exe iggy@Area51 /cygdrive/c/src/return_el/Debug $ echo $? 1 iggy@Area51 /cygdrive/c/src/return_el/Debug $ echo $? 0 iggy@Area51 /cygdrive/c/src/return_el/Debug $ ./return_el.exe > c:/notpresent/data.dat bash: c:/notpresent/data.dat: No such file or directory iggy@Area51 /cygdrive/c/src/return_el/Debug $ echo $? 1