Bug #68850 mysqldump warns about mysql.event contents not being dumped even if table empty
Submitted: 3 Apr 2013 8:58 Modified: 3 Apr 2013 11:52
Reporter: Hartmut Holzgraefe Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:mysql-5.5.30 OS:Any
Assigned to: CPU Architecture:Any

[3 Apr 2013 8:58] Hartmut Holzgraefe
Description:
With MySQL 5.5.30 a warning was added to mysqldump when dumping the system database:

  -- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

This warning is printed even if there is no actual data in mysql.event (no EVENTs defined).

This breaks backup scripts that rely on mysqldump to finish without any warnings or other output to stderr.

--ignore-table=mysql.event can be used as a workaround but existing scripts would need to be changed for no good reason ...

How to repeat:
Run "mysqldump mysql" on a 5.5.30 installation

Suggested fix:
Currently mysqldump only checks whether the --events option is given and database and table name match "mysql" and "event", respectively.

Add a test that actually checks for mysql.event not being empty (e.g. a SELECT COUNT(*)) before printing the "Skipping the data of table mysql.event" warning and skip it if no actual data is in that table anyway
[3 Apr 2013 11:52] MySQL Verification Team
Thank you for the bug report.

d:\dbs\5.5>bin\mysqldump -uroot mysql | findstr warning
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
[11 Oct 2013 10:10] Honza Horak
Consider marking this bug as duplicate of #68376.