Skip to content

Commit 77768ac

Browse files
committed
Typo: PreviousGtidsEvent
1 parent 4b93dd5 commit 77768ac

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

pymysqlreplication/binlogstream.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
XidEvent, GtidEvent, StopEvent, XAPrepareEvent,
1616
BeginLoadQueryEvent, ExecuteLoadQueryEvent,
1717
HeartbeatLogEvent, NotImplementedEvent, MariadbGtidEvent,
18-
PreviousGtidEvent)
18+
PreviousGtidsEvent)
1919
from .exceptions import BinLogNotEnabled
2020
from .row_event import (
2121
UpdateRowsEvent, WriteRowsEvent, DeleteRowsEvent, TableMapEvent)
@@ -602,7 +602,7 @@ def _allowed_event_list(self, only_events, ignored_events,
602602
HeartbeatLogEvent,
603603
NotImplementedEvent,
604604
MariadbGtidEvent,
605-
PreviousGtidEvent
605+
PreviousGtidsEvent
606606
))
607607
if ignored_events is not None:
608608
for e in ignored_events:

pymysqlreplication/event.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __repr__(self):
9090
return '<GtidEvent "%s">' % self.gtid
9191

9292

93-
class PreviousGtidEvent(BinLogEvent):
93+
class PreviousGtidsEvent(BinLogEvent):
9494
"""
9595
PreviousGtidEvent is contains the Gtids executed in the last binary log file.
9696
Attributes:
@@ -100,7 +100,7 @@ class PreviousGtidEvent(BinLogEvent):
100100
Eg: [4c9e3dfc-9d25-11e9-8d2e-0242ac1cfd7e:1-100, 4c9e3dfc-9d25-11e9-8d2e-0242ac1cfd7e:1-10:20-30]
101101
"""
102102
def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs):
103-
super(PreviousGtidEvent, self).__init__(from_packet, event_size, table_map,
103+
super(PreviousGtidsEvent, self).__init__(from_packet, event_size, table_map,
104104
ctl_connection, **kwargs)
105105

106106
self._n_sid = self.packet.read_int64()
@@ -121,7 +121,7 @@ def _dump(self):
121121
print("previous_gtids: %s" % self._previous_gtids)
122122

123123
def __repr__(self):
124-
return '<PreviousGtidEvent "%s">' % self._previous_gtids
124+
return '<PreviousGtidsEvent "%s">' % self._previous_gtids
125125

126126

127127
class MariadbGtidEvent(BinLogEvent):

pymysqlreplication/packet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class BinLogPacketWrapper(object):
6565
constants.XID_EVENT: event.XidEvent,
6666
constants.INTVAR_EVENT: event.IntvarEvent,
6767
constants.GTID_LOG_EVENT: event.GtidEvent,
68-
constants.PREVIOUS_GTIDS_LOG_EVENT: event.PreviousGtidEvent,
68+
constants.PREVIOUS_GTIDS_LOG_EVENT: event.PreviousGtidsEvent,
6969
constants.STOP_EVENT: event.StopEvent,
7070
constants.BEGIN_LOAD_QUERY_EVENT: event.BeginLoadQueryEvent,
7171
constants.EXECUTE_LOAD_QUERY_EVENT: event.ExecuteLoadQueryEvent,

pymysqlreplication/tests/test_basic.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
class TestBasicBinLogStreamReader(base.PyMySQLReplicationTestCase):
2424
def ignoredEvents(self):
25-
return [GtidEvent, PreviousGtidEvent]
25+
return [GtidEvent, PreviousGtidsEvent]
2626

2727
def test_allowed_event_list(self):
2828
self.assertEqual(len(self.stream._allowed_event_list(None, None, False)), 17)
@@ -522,7 +522,7 @@ def test_end_log_pos(self):
522522

523523
class TestMultipleRowBinLogStreamReader(base.PyMySQLReplicationTestCase):
524524
def ignoredEvents(self):
525-
return [GtidEvent, PreviousGtidEvent]
525+
return [GtidEvent, PreviousGtidsEvent]
526526

527527
def test_insert_multiple_row_event(self):
528528
query = "CREATE TABLE test (id INT NOT NULL AUTO_INCREMENT, data VARCHAR (50) NOT NULL, PRIMARY KEY (id))"
@@ -844,7 +844,7 @@ def test_read_query_event(self):
844844
query = "COMMIT;"
845845
self.execute(query)
846846

847-
self.assertIsInstance(self.stream.fetchone(), PreviousGtidEvent)
847+
self.assertIsInstance(self.stream.fetchone(), PreviousGtidsEvent)
848848
firstevent = self.stream.fetchone()
849849
self.assertIsInstance(firstevent, GtidEvent)
850850

@@ -894,7 +894,7 @@ def test_position_gtid(self):
894894

895895
self.assertIsInstance(self.stream.fetchone(), RotateEvent)
896896
self.assertIsInstance(self.stream.fetchone(), FormatDescriptionEvent)
897-
self.assertIsInstance(self.stream.fetchone(), PreviousGtidEvent)
897+
self.assertIsInstance(self.stream.fetchone(), PreviousGtidsEvent)
898898
self.assertIsInstance(self.stream.fetchone(), GtidEvent)
899899
event = self.stream.fetchone()
900900

pymysqlreplication/tests/test_data_type.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def encode_value(v):
3232

3333
class TestDataType(base.PyMySQLReplicationTestCase):
3434
def ignoredEvents(self):
35-
return [GtidEvent, PreviousGtidEvent]
35+
return [GtidEvent, PreviousGtidsEvent]
3636

3737
def create_and_insert_value(self, create_query, insert_query):
3838
self.execute(create_query)

0 commit comments

Comments
 (0)