@@ -304,15 +304,21 @@ func (t *testSyncerSuite) setupTest(flavor string) {
304
304
305
305
func (t * testSyncerSuite ) testPositionSync () {
306
306
// get current master binlog file and position
307
- r , err := t .c .Execute ("SHOW MASTER STATUS" )
307
+ showBinlogStatus := "SHOW BINARY LOG STATUS"
308
+ showReplicas := "SHOW REPLICAS"
309
+ if eq , err := t .c .CompareServerVersion ("8.4.0" ); (err == nil ) && (eq < 0 ) {
310
+ showBinlogStatus = "SHOW MASTER STATUS"
311
+ showReplicas = "SHOW SLAVE HOSTS"
312
+ }
313
+ r , err := t .c .Execute (showBinlogStatus )
308
314
require .NoError (t .T (), err )
309
315
binFile , _ := r .GetString (0 , 0 )
310
316
binPos , _ := r .GetInt (0 , 1 )
311
317
312
318
s , err := t .b .StartSync (mysql.Position {Name : binFile , Pos : uint32 (binPos )})
313
319
require .NoError (t .T (), err )
314
320
315
- r , err = t .c .Execute ("SHOW SLAVE HOSTS" )
321
+ r , err = t .c .Execute (showReplicas )
316
322
require .NoError (t .T (), err )
317
323
318
324
// List of replicas must not be empty
@@ -406,7 +412,12 @@ func (t *testSyncerSuite) TestMysqlSemiPositionSync() {
406
412
func (t * testSyncerSuite ) TestMysqlBinlogCodec () {
407
413
t .setupTest (mysql .MySQLFlavor )
408
414
409
- t .testExecute ("RESET MASTER" )
415
+ resetBinaryLogs := "RESET BINARY LOGS AND GTIDS"
416
+ if eq , err := t .c .CompareServerVersion ("8.4.0" ); (err == nil ) && (eq < 0 ) {
417
+ resetBinaryLogs = "RESET MASTER"
418
+ }
419
+
420
+ t .testExecute (resetBinaryLogs )
410
421
411
422
var wg sync.WaitGroup
412
423
wg .Add (1 )
0 commit comments