We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 022fd34 commit 1842248Copy full SHA for 1842248
pymysqlreplication/gtid.py
@@ -287,6 +287,8 @@ def merge_gtid(self, gtid):
287
self.gtids = new_gtids
288
289
def __contains__(self, other):
290
+ if isinstance(other, GtidSet):
291
+ return all(other_gtid in self.gtids for other_gtid in other.gtids)
292
if isinstance(other, Gtid):
293
return any(other in x for x in self.gtids)
294
raise NotImplementedError
@@ -296,6 +298,13 @@ def __add__(self, other):
296
298
new = GtidSet(self.gtids)
297
299
new.merge_gtid(other)
300
return new
301
+
302
303
+ new = GtidSet(self.gtids)
304
+ for gtid in other.gtids:
305
+ new.merge_gtid(gtid)
306
+ return new
307
308
309
310
def __str__(self):
0 commit comments