Description:
On windows (maybe Japanses edition), mysqlfailover's health check for slave fails with UnicodeDecodeError.
C:\Windows\system32>"C:\Program Files\MySQL\MySQL Utilities 1.6\mysqlfailover.exe" --master=root:root@127.0.0.1 --slaves=failover:failover@17x.xx.xx.xxx --candidates=failover:failover@17x.xx.xx.xxx --force
WARNING: Using a password on the command line interface can be insecure.
# Checking privileges.
# Checking privileges on candidates.
Traceback (most recent call last):
File "G:\ade\build\sb_0-21858576-1484679521.91\Python-2.7.6-windows-x86-32bit\lib\site-packages\cx_Freeze\initscripts\
Console.py", line 27, in <module>
File "scripts\mysqlfailover.py", line 407, in <module>
File ".\mysql\utilities\command\rpl_admin.py", line 713, in auto_failover
File ".\mysql\utilities\common\topology.py", line 1605, in check_privileges
File ".\mysql\utilities\common\topology.py", line 1745, in connect_candidate
File ".\mysql\utilities\common\server.py", line 1098, in connect
File ".\mysql\utilities\common\server.py", line 1178, in get_connection
File ".\mysql\connector\__init__.py", line 179, in connect
File ".\mysql\connector\connection.py", line 95, in __init__
File ".\mysql\connector\abstracts.py", line 715, in connect
File ".\mysql\connector\connection.py", line 206, in _open_connection
File ".\mysql\connector\network.py", line 512, in open_connection
File ".\mysql\connector\errors.py", line 185, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 6: ordinal not in range(128)
How to repeat:
(1) Prepare Japanese Windows machine
(2) Install MySQL Utility
(3) run mysqlfailover utility with valid master and invalid slave.
C:\Windows\system32>"C:\Program Files\MySQL\MySQL Utilities 1.6\mysqlfailover.exe" --master=root:root@127.0.0.1 --slaves=failover:failover@172.30.50.220 --candidates=failover:failover@172.30.50.220 --force
On Linux platform that works well.
Suggested fix:
MySQL Utility try to deal with strings with ascii, but Japanese Windows returns start with 0x91(or 0x90) strings. it may be cp932(sjis) strings.
so MySQL Utility should be deal with error from slave in error number (or something) independent from charset of OS.