yoshinorim / mha4mysql-manager

Development tree of Master High Availability Manager and tools for MySQL (MHA), Manager part
http://code.google.com/p/mysql-master-ha/
GNU General Public License v2.0
1.46k stars 501 forks source link

Patch for MHA when using {master,relay_log}_info_repository = TABLE #47

Open sjmudd opened 9 years ago

sjmudd commented 9 years ago

I was trying MHA and noticed on the servers I use that it does not work properly on MySQL 5.6 with the following settings:

master_info_repository = TABLE relay_log_info_repository = TABLE

I notice that there is code to check for the value being TABLE and not FILE but it does not work, at least not in the 0.56 rpms that I have been using.

There are 2 patches which can be found at: http://ftp.wl0.org/mha/

Please consider incorporating these patches into MHA. Note: 1 patch is for the manager and another one is for the node. I'm only making 1 issue but can make a separate one for https://github.com/yoshinorim/mha4mysql-node if that's better.

grypyrg commented 8 years ago

Has this bug been fixed in a different way? I was not able to reproduce the problem @sjmudd had.

y-trudeau commented 7 years ago

I have been to reproduce. You just need the master to have an empty mysql.slave_relay_log_info and the /usr/bin/masterha_check_repl script breaks in Server.pm at line 241:

Wed Nov 16 09:17:28 2016 - [error][/usr/share/perl5/MHA/Server.pm, ln241] Getting relay log directory or current relay logfile from replication table failed on 10.10.10.20(10.10.10.20:3306)!

root@egov-monitor-00:~# mysql -h 10.10.10.20 -u mha_user -p -e 'show slave status\Gshow master status;select * from mysql.slave_relay_log_info;' Enter password: +------------------------+-----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +------------------------+-----------+--------------+------------------+-------------------+ | mysqld-bin.002816 | 869689395 | | | | +------------------------+-----------+--------------+------------------+-------------------+