Description:
mysql cli client accepts stdin as file input
shell> mysql < data.sql
however if there is an error in data.sql you only get to see rownumber and error
shell> mysql -uroot test < data.sql
ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 15
using verbose mode (-v) you get to see all commands run
shell> mysql -uroot -v test < lol.sql
--------------
insert into t values(1)
--------------
...
--------------
insert into t values(1)
--------------
--------------
insert into t values(1,3)
--------------
ERROR 1136 (21S01) at line 15: Column count doesn't match value count at row 1
There should be an option to print the sql statement that produced the error, somewhere between the current default behavior and -v
How to repeat:
Contained in description
Suggested fix:
shell> mysql -uroot --print-error-statements test < data.sql
ERROR 1136 (21S01) at line 15: Column count doesn't match value count at row 1
Statement at line 15: insert into t values(1,3)