Sometimes I've run into situations where developers have changed structures, added/removed columns on different DB servers, environments, etc for the same table and this causes errors such as ERROR 1136 (21S01): Column count doesn't match value count at row 1
.
At other times, there are data type mismatch errors. I usually write the output of a mysqldump restore to a log file, but I cannot find the table names in this log, just Query OK, Warning and/or Error messages.
I'd like to be able to instantly see which table caused the errors. Of course I can write a custom bash script, but it would be easier to be able to log the current table name into the log file.
Edit (20230619) :
I understand that mysqldump restore is done through the standard mysql client, which basically runs any queries in the dump sql file, which is why expecting it to log table names is not logical. My question is still relevant, maybe there is a tool out there that does this?