Skip to content

Commit

Permalink
nil check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Dec 18, 2024
1 parent 558e987 commit 3328319
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/mysql/gtid.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import (
)

func ShouldProcessRow(set mysql.GTIDSet, currentGTID string) (bool, error) {
if set == nil {
// We have not seen any GTIDs yet, so we should process this one.
return true, nil
}

gtidSet, ok := set.(*mysql.MysqlGTIDSet)
if !ok {
return false, fmt.Errorf("unsupported GTID set type: %T", set)
Expand Down

0 comments on commit 3328319

Please sign in to comment.