File tree 1 file changed +7
-3
lines changed
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 {
324
324
}
325
325
}
326
326
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
327
334
func getShowBinaryLogQuery (flavor , serverVersion string ) string {
328
335
switch flavor {
329
336
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
-
332
337
eq , err := mysql .CompareServerVersions (serverVersion , "10.5.2" )
333
338
if (err == nil ) && (eq >= 0 ) {
334
339
return "SHOW BINLOG STATUS"
335
340
}
336
341
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
338
342
eq , err := mysql .CompareServerVersions (serverVersion , "8.4.0" )
339
343
if (err == nil ) && (eq >= 0 ) {
340
344
return "SHOW BINARY LOG STATUS"
You can’t perform that action at this time.
0 commit comments