Bug #64223 MySQLdump is not filtering the LOCK TABLE when --ignore-table=mysql.general_log
Submitted: 3 Feb 2012 20:46 Modified: 4 Feb 2012 15:40
Reporter: Marco Tusa Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.1.61 OS:Linux
Assigned to: CPU Architecture:Any
Tags: Backup, mysqldump

[3 Feb 2012 20:46] Marco Tusa
Description:
When running mysqldump -uxxx -p --ignore-table=mysql.general_log > my_dump.sql

The table is not skip by the the LOCK TABLE and it results in an error:

<pre>
 mysqldump -uxxx -p --opt --ignore-table=mysql.general_log  mysql > /tmp/mysql.sql
Enter password:
mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES
</pre>

How to repeat:
Run  mysqldump -uxxxx -p --opt --ignore-table=mysql.general_log  mysql > /tmp/mysql.sql
Enter password:

Suggested fix:
Do the skip of the table BEFORE doing the filtering for the exclusion
[4 Feb 2012 9:14] Valeriy Kravchuk
Just to be sure, please, send the output of:

mysqldump --version
[4 Feb 2012 15:35] Marco Tusa
Valery tks I missed that, there was a reference of an old rpm installation on the customer machine, from initial installation.

[pythian@DB-MASTER ~]$ mysqldump --version
mysqldump  Ver 10.11 Distrib 5.0.77, for redhat-linux-gnu (x86_64)
[pythian@DB-MASTER ~]$ /usr/local/mysql/bin/mysqldump --version
mysqldump  Ver 10.13 Distrib 5.1.61, for unknown-linux-gnu (x86_64)

close the bug I will fix the reference on server.
I did the test and all works as expected.
[4 Feb 2012 15:40] Valeriy Kravchuk
Not repeatable with current version of mysqldump. Old version was used by mistake...