safe-slave-backup fails with sql_mode=ANSI_QUOTES

We are using sql_mode=ANSI_QUOTES in one of our MySQL environments. When taking backups on a replication slave with --safe-slave-backups, Innobackupex script fails with:

innobackupex: Error: mysql child process has died: ERROR 1064 (42000) at line 7: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘“slave_open_temp_tables”’ at line 1while waiting for reply to MySQL request: ‘SHOW STATUS LIKE “slave_open_temp_tables”\G;’ at /usr/bin/innobackupex line 336.

It seems innobackupex uses double quotes on a string, and this does not work with ANSI_QUOTES. The root cause can be found from the innobackupex perl script:

sub get_slave_open_temp_tables { my @lines; mysql_send ‘SHOW STATUS LIKE “slave_open_temp_tables”\G;’; file_to_array($mysql_stdout, @lines);# …

As a temporary solution, we changed the SHOW STATUS command string to use single quotes, but it would be great if this would be fixed in the official Xtrabackup release.

Mikko Vilpponen

Indeed, this is a bug. I have reported it: [URL][/URL]

Please click the “this bug affects me” button to vote for it and raise its importance.