Not the answer you need?
Register and ask your own question!

safe-slave-backup fails with sql_mode=ANSI_QUOTES

msvilpmsvilp EntrantInactive User Role Beginner
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.</pre>


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);# ...</pre>


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.

Regards,
Mikko Vilpponen

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.