We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7328e9a + c9b69dc commit 9e337eeCopy full SHA for 9e337ee
pymysqlreplication/gtid.py
@@ -3,6 +3,7 @@
3
import re
4
import struct
5
import binascii
6
+from copy import deepcopy
7
from io import BytesIO
8
9
def overlap(i1, i2):
@@ -165,7 +166,7 @@ def __add__(self, other):
165
166
raise Exception('Attempt to merge different SID'
167
'%s != %s' % (self.sid, other.sid))
168
- result = Gtid(str(self))
169
+ result = deepcopy(self)
170
171
for itvl in other.intervals:
172
result.__add_interval(itvl)
@@ -175,7 +176,7 @@ def __add__(self, other):
175
176
def __sub__(self, other):
177
"""Remove intervals. Do not raise, if different SID simply
178
ignore"""
179
180
if self.sid != other.sid:
181
return result
182
0 commit comments