Skip to content

Commit d7af7d5

Browse files
committed
use slice copy instead of encode and decode
1 parent 0c5789d commit d7af7d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ require (
1515
github.com/sirupsen/logrus v1.4.1 // indirect
1616
golang.org/x/text v0.3.2 // indirect
1717
)
18+
19+
go 1.13

mysql/mysql_gtid.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func (s *UUIDSet) Decode(data []byte) error {
292292
func (s *UUIDSet) Clone() *UUIDSet {
293293
clone := new(UUIDSet)
294294

295-
clone.SID, _ = uuid.FromString(s.SID.String())
295+
copy(clone.SID.Bytes(), s.SID.Bytes())
296296
clone.Intervals = s.Intervals.Normalize()
297297

298298
return clone

0 commit comments

Comments
 (0)