Bug #8684 No way of logging warnings on import
Submitted: 22 Feb 2005 13:27 Modified: 24 May 2005 19:09
Reporter: Marcus Bointon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.10 OS:
Assigned to: Geert Vanderkelen CPU Architecture:Any

[22 Feb 2005 13:27] Marcus Bointon
Description:
When executing a mysqldump file containing hundreds of thousands or records, I get a large number of warnings, but I'm never told what the warnings are, nor does there seem to be any way of finding out at the time or having them logged. It seems the only thing I can do is log everything verbosely, then manually search through the monstrous dump files to find the error messages.

The log_warnings system variable seems to do nothing, nor does it appear to be properly documented (it's mentioned in passing, but nowhere are its values explained).

Lack of this is going to cost me literally days of work that I will have to repeat every time I want to do this kind of import, and I can't believe that no-one wants to see warnings. I've rated this S3 as it's more than a cosmetic oversight - it's almost enough to make me stop using mysql altogether. I notice in other places that you're doing quite the opposite! http://bugs.mysql.com/bug.php?id=6662

I'm observing this in 4.1.10, but I suspect that it is doing the same in earlier versions.

How to repeat:
Execute a mysqldump file that generates warnings in the mysql client.
Attempt to find out what the warnings are.

Suggested fix:
Document the log_warnings variable.
Allow warnings to be logged to either the main error log, or a custom client-side log, or add the ability to display warnings as they occur, rather than just their count. Perhaps amend the verbose output handler to issue a 'SHOW WARNINGS' if warnings > 0.
[1 Apr 2005 9:47] Sergei Golubchik
mysql command-line client will be able to print all warnings (issuing SHOW WARNINGS automatically)
[24 May 2005 19:09] Paul DuBois
Noted in mysql description and 5.0.6 changelog.