Bug #81782 --binary-mode disables SOURCE command
Submitted: 9 Jun 2016 3:44 Modified: 2 Mar 2018 2:43
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:5.7.12, 5.6.31, 5.7.13 OS:Any
Assigned to: CPU Architecture:Any

[9 Jun 2016 3:44] Roel Van de Paar

Does not list disabling the SOURCE command (in fact it refers to it), yet when using --binary-mode, we see;

$ ./bin/mysql -A -uroot -S./socket.sock -e"SOURCE /tmp/notexist.sql"
ERROR at line 1: Failed to open file '/tmp/notexist.sql', error: 2

$ ./bin/mysql -A -uroot -S./socket.sock --binary-mode -e"SOURCE /tmp/notexist.sql"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE /tmp/notexist.sql' at line 1

How to repeat:
As per above

Suggested fix:
Enable using SOURCE command in combination with --binary-mode
[9 Jun 2016 4:52] Roel Van de Paar
[9 Jun 2016 6:37] MySQL Verification Team
Hello Roel,

Thank you for the report.

[2 Mar 2018 2:43] Roel Van de Paar
It would be great to see this bug fixed as it may cause continual mistakes in QA and elsewhere. While fixing, please have a look at bug #81784 also please.