Closed
Description
When running func (c *canal.Canal) GetMasterPos()
with a cfg.Flavor = "mariadb"
, the method always fails with the following error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOG STATUS' at line 1
It always fails because these lines assume only mysql versions, excluding mariadb.
The proper way to get the master position is either using SHOW MASTER STATUS
for mariadb version previous than 10.5.2
or the more recent SHOW BINLOG STATUS
. Here's the source.