Skip to content

Commit

Permalink
dm: handle the query in metadata from binlog (#11743)
Browse files Browse the repository at this point in the history
close #11735
  • Loading branch information
joccau authored Nov 21, 2024
1 parent f4dcfe4 commit 1ba95a4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dm/pkg/dumpling/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func ParseMetaDataByReader(filename string, rd io.Reader) (*binlog.Location, *bi
}

switch line {
case "SHOW MASTER STATUS:":
case "SHOW BINARY LOG STATUS:",
"SHOW MASTER STATUS:":
if err3 := parsePosAndGTID(&pos, &gtidStr); err3 != nil {
return nil, nil, err3
}
Expand Down
23 changes: 23 additions & 0 deletions dm/pkg/dumpling/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,29 @@ Finished dump at: 2018-12-27 19:51:22`,
mysql.Position{},
"",
},
{
`Started dump at: 2018-12-27 19:51:22
SHOW BINARY LOG STATUS:
Log: mysql-bin.000004
Pos: 3295818
GTID:
SHOW SLAVE STATUS:
Host: 10.128.27.98
Log: mysql-bin.000003
Pos: 329635
GTID:
Finished dump at: 2018-12-27 19:51:22`,
mysql.Position{
Name: "mysql-bin.000004",
Pos: 3295818,
},
"",
false,
mysql.Position{},
"",
},
{ // with empty line after multiple GTID sets
`Started dump at: 2020-05-21 18:14:49
SHOW MASTER STATUS:
Expand Down

0 comments on commit 1ba95a4

Please sign in to comment.