Closed GeoffMontee closed 9 years ago
The reason that this appears to be failing is because RaiseError
is set to 1 in the DBI connection string here:
If I change the connection string to this:
my $dbh =
DBI->connect( $dsn, $opt{user}, $opt{password},
{ PrintError => 1, RaiseError => 0 } );
Then it works:
[gmontee@slave ~]$ sudo ./purge_relay_logs --user=root --disable_relay_log_purge --relay_log_info=/var/lib/mysql/relay-log.info
2015-05-26 20:04:36: purge_relay_logs script started.
DBD::mysql::st execute failed: Unknown system variable 'relay_log_info_repository' at /usr/share/perl5/vendor_perl/MHA/SlaveUtil.pm line 58.
DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at /usr/share/perl5/vendor_perl/MHA/SlaveUtil.pm line 59.
Found relay_log.info: /var/lib/mysql/relay-log.info
Opening /var/lib/mysql/slave-relay-bin.000002 ..
Opening /var/lib/mysql/slave-relay-bin.000003 ..
Executing SET GLOBAL relay_log_purge=1; FLUSH LOGS; sleeping a few seconds so that SQL thread can delete older relay log files (if it keeps up); SET GLOBAL relay_log_purge=0; .. ok.
2015-05-26 20:04:39: All relay log purging operations succeeded.
In MariaDB 10.0,
purge_relay_logs
fails because therelay_log_info_repository
variable doesn't exist.This also appears to fail even if a path to the relay log info file is explicitly defined:
The check that's failing appears to happen here:
https://github.com/yoshinorim/mha4mysql-node/blob/ef26bdeeeb16c4c1c5e37bdaa276d118ffdd85e7/bin/purge_relay_logs#L204