File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ func (s *UUIDSet) Decode(data []byte) error {
294
294
func (s * UUIDSet ) Clone () * UUIDSet {
295
295
clone := new (UUIDSet )
296
296
297
- copy (clone .SID . Bytes () , s .SID . Bytes () )
297
+ copy (clone .SID [:] , s .SID [:] )
298
298
clone .Intervals = s .Intervals .Normalize ()
299
299
300
300
return clone
Original file line number Diff line number Diff line change @@ -214,3 +214,12 @@ func (t *mysqlTestSuite) TestMysqlNullDecode(c *check.C) {
214
214
c .Assert (isNull , check .IsTrue )
215
215
c .Assert (n , check .Equals , 1 )
216
216
}
217
+
218
+ func (t * mysqlTestSuite ) TestMysqlUUIDClone (c * check.C ) {
219
+ us , err := ParseUUIDSet ("de278ad0-2106-11e4-9f8e-6edd0ca20947:1-2" )
220
+ c .Assert (err , check .IsNil )
221
+ c .Assert (us .String (), check .Equals , "de278ad0-2106-11e4-9f8e-6edd0ca20947:1-2" )
222
+
223
+ clone := us .Clone ()
224
+ c .Assert (clone .String (), check .Equals , "de278ad0-2106-11e4-9f8e-6edd0ca20947:1-2" )
225
+ }
You can’t perform that action at this time.
0 commit comments