Bug #89907 mysqlsh -f returns 1 on success
Submitted: 5 Mar 2018 9:49 Modified: 27 Mar 2018 7:46
Reporter: Robert Neumayer Email Updates:
Status: Closed Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:1.0.11 OS:Any
Assigned to: CPU Architecture:Any

[5 Mar 2018 9:49] Robert Neumayer
Description:
When using batch mode, shell returns 1 even if the commands ran successfully..

How to repeat:
bash-4.2# mysqlsh root@localhost -f /tmp/x.js 
Enter password: 
bash-4.2# echo $?
1

x.js is valid javascript that gets correctly executed.

For files containing invalid commands we get the same.

Suggested fix:
Return 0 on success, codes higher than 0 for failure.
[5 Mar 2018 13:32] MySQL Verification Team
Hello Robert,

Thank you for the report!

Thanks,
Umesh
[15 Mar 2018 20:37] Alfredo Kojima
Posted by developer:
 
Confirmed as already fixed as of 8.0.4