Bug #81784 Position of --force within command line matters for mysql client
Submitted: 9 Jun 2016 4:52 Modified: 2 Mar 2018 2:43
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:5.7.12, 5.5.50, 5.6.31, 5.7.13 OS:Any
Assigned to: CPU Architecture:Any

[9 Jun 2016 4:52] Roel Van de Paar
Description:
./bin/mysql -A -uroot -S./socket.sock -e"SOURCE input.sql" --force test

Does not act the same as 

./bin/mysql -A -uroot -S./socket.sock --force -e"SOURCE input.sql" test

In the first case, all commands are executed. 
In the second case, all commands up to the first one that fails are executed.

How to repeat:
1) Create a faulty SQL input.sql file
2) As per above
[9 Jun 2016 5:00] Roel Van de Paar
The manual is silent in this area;
http://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_force
[9 Jun 2016 6:35] Umesh Shastry
Hello Roel,

Thank you for the report.
Observed this with 5.5, 5.6 and 5.7 GA builds.

Thanks,
Umesh
[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. The option --force should always work, wherever it is placed. It would also seem that this is easy to fix. While fixing, please have a look at bug #81782 also please.