Shopify / ghostferry

The swiss army knife of live data migrations
https://shopify.github.io/ghostferry
MIT License
748 stars 70 forks source link

MariaDB SHOW SLAVE HOSTS output differs from MySQL #294

Closed HemeraOne closed 3 years ago

HemeraOne commented 3 years ago

as per documentation the SHOW SLAVE HOSTS differ from eachother for MariaDB and MySQL

https://dev.mysql.com/doc/refman/5.7/en/show-slave-hosts.html https://mariadb.com/kb/en/show-replica-hosts/

mysql> SHOW SLAVE HOSTS;
+------------+-----------+------+-----------+--------------------------------------+
| Server_id  | Host      | Port | Master_id | Slave_UUID                           |
+------------+-----------+------+-----------+--------------------------------------+
|  192168010 | iconnect2 | 3306 | 192168011 | 14cb6624-7f93-11e0-b2c0-c80aa9429562 |
| 1921680101 | athena    | 3306 | 192168011 | 07af4990-f41f-11df-a566-7ac56fdaf645 |
+------------+-----------+------+-----------+--------------------------------------+

mariadb> SHOW SLAVE HOSTS;
+------------+-----------+------+-----------+
| Server_id  | Host      | Port | Master_id |
+------------+-----------+------+-----------+
|  192168010 | iconnect2 | 3306 | 192168011 |
| 1921680101 | athena    | 3306 | 192168011 |
+------------+-----------+------+-----------+

This creates the following error:

ERRO[0000] could not generate unique server_id           error="could not scan SHOW SLAVE HOSTS row, err: sql: expected 4 destination arguments in Scan, not 5" tag=source_binlog_streamer
ERRO[0000] fatal error detected                          errfrom=ferry.start error="could not scan SHOW SLAVE HOSTS row, err: sql: expected 4 destination arguments in Scan, not 5" tag=error_handler
error: failed to start ferry: could not scan SHOW SLAVE HOSTS row, err: sql: expected 4 destination arguments in Scan, not 5