File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -324,17 +324,21 @@ func (c *Canal) WaitUntilPos(pos mysql.Position, timeout time.Duration) error {
324324 }
325325}
326326
327+ // getShowBinaryLogQuery returns the correct SQL statement to query binlog status
328+ // for the given database flavor and server version.
329+ //
330+ // Sources:
331+ //
332+ // MySQL: https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html
333+ // MariaDB: https://mariadb.com/kb/en/show-binlog-status
327334func getShowBinaryLogQuery (flavor , serverVersion string ) string {
328335 switch flavor {
329336 case mysql .MariaDBFlavor :
330- // Source: https://mariadb.com/kb/en/show-binlog-status/#:~:text=SHOW%20BINLOG%20STATUS%20%2D%2D-,From%20MariaDB%2010.5.2,-Description
331-
332337 eq , err := mysql .CompareServerVersions (serverVersion , "10.5.2" )
333338 if (err == nil ) && (eq >= 0 ) {
334339 return "SHOW BINLOG STATUS"
335340 }
336341 case mysql .MySQLFlavor :
337- // Source: https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html#:~:text=AND%20GTIDS)%3B-,SHOW%20MASTER%20STATUS,-(SHOW%20BINARY
338342 eq , err := mysql .CompareServerVersions (serverVersion , "8.4.0" )
339343 if (err == nil ) && (eq >= 0 ) {
340344 return "SHOW BINARY LOG STATUS"
You can’t perform that action at this time.
0 commit comments