From 029a60d602a26dcc1f9281c7544b0dc95d1ca4c9 Mon Sep 17 00:00:00 2001 From: heehehe Date: Mon, 21 Aug 2023 01:32:18 +0900 Subject: [PATCH 01/16] docs: modify BeginLoadQueryEvent comment --- pymysqlreplication/event.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 6395a3ae..ada74359 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -352,10 +352,11 @@ def _read_status_vars_value_for_key(self, key): class BeginLoadQueryEvent(BinLogEvent): """ + This event is written into the binary log file for LOAD DATA INFILE events + if the server variable binlog_mode was set to "STATEMENT". - Attributes: - file_id - block-data + :ivar file_id: the id of the file + :ivar block-data: data block about "LOAD DATA INFILE" """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(BeginLoadQueryEvent, self).__init__(from_packet, event_size, table_map, From 1e34edb7b9e29c01ef8f7cbd71e02844b25a86f8 Mon Sep 17 00:00:00 2001 From: starcat37 Date: Tue, 22 Aug 2023 18:46:03 +0900 Subject: [PATCH 02/16] docs: add NotImplementedEvent comment --- pymysqlreplication/event.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index ada74359..5c1802db 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -439,6 +439,11 @@ def _dump(self): class NotImplementedEvent(BinLogEvent): + """ + Used as a temporary class for events that have not yet been implemented. + + The event referencing this class skips parsing. + """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(NotImplementedEvent, self).__init__( from_packet, event_size, table_map, ctl_connection, **kwargs) From a0fd49c0cecdc0ff8b935fa6aeacdc393e4fb21d Mon Sep 17 00:00:00 2001 From: starcat37 Date: Tue, 22 Aug 2023 18:48:21 +0900 Subject: [PATCH 03/16] docs: modify IntvarEvent comment --- pymysqlreplication/event.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 5c1802db..20ce66ef 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -419,10 +419,12 @@ def _dump(self): class IntvarEvent(BinLogEvent): """ - - Attributes: - type - value + Stores the value of auto-increment variables. + This event will be created just before a QueryEvent. + + :ivar type: int - 1 byte identifying the type of variable stored. + Can be either LAST_INSERT_ID_EVENT (1) or INSERT_ID_EVENT (2). + :ivar value: int - The value of the variable """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(IntvarEvent, self).__init__(from_packet, event_size, table_map, From dd5b2323a22a00b6f8729e0c28c4f9238145990c Mon Sep 17 00:00:00 2001 From: ebang Date: Fri, 25 Aug 2023 14:54:17 +0900 Subject: [PATCH 04/16] docs: modify MariadbGtidEvents comments --- pymysqlreplication/event.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 20ce66ef..7dcff94e 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -92,8 +92,15 @@ def __repr__(self): class MariadbGtidEvent(BinLogEvent): """ - GTID change in binlog event in MariaDB - https://mariadb.com/kb/en/gtid_event/ + GTID(Global Transaction Identifier) change in binlog event in MariaDB + + for more information: `[see details] `_. + + :ivar server_id: int - The ID of the server where the GTID event occurred. + :ivar gtid_seq_no: int - The sequence number of the GTID event. + :ivar domain_id: int - The domain ID associated with the GTID event. + :ivar flags: int - Flags related to the GTID event. + :ivar gtid: str - The Global Transaction Identifier in the format ‘domain_id-server_id-gtid_seq_no’. """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): From 679543f555596489cd875364bef352e913387638 Mon Sep 17 00:00:00 2001 From: ebang Date: Fri, 25 Aug 2023 14:55:21 +0900 Subject: [PATCH 05/16] docs: modify GtidEvent comments --- pymysqlreplication/event.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 7dcff94e..affb6671 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -54,6 +54,16 @@ def _dump(self): class GtidEvent(BinLogEvent): """GTID change in binlog event + + For more information : `[GTID] `_ `[see also] `_ + + :ivar commit_flag: 1byte - 00000001 = Transaction may have changes logged with SBR. + In 5.6, 5.7.0-5.7.18, and 8.0.0-8.0.1, this flag is always set. Starting in 5.7.19 and 8.0.2, this flag is cleared if the transaction only contains row events. It is set if any part of the transaction is written in statement format. + :ivar sid: 16 byte sequence - UUID representing the SID + :ivar gno: int - Group number, second component of GTID. + :ivar lt_type: int(1 byte) - The type of logical timestamp used in the logical clock fields. + :ivar last_committed: Store the transaction's commit parent sequence_number + :ivar sequence_number: The transaction's logical timestamp assigned at prepare phase """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(GtidEvent, self).__init__(from_packet, event_size, table_map, From 5456e1dadd5eaddf7dc8a6035ce714b044e097aa Mon Sep 17 00:00:00 2001 From: ebang Date: Fri, 25 Aug 2023 14:56:54 +0900 Subject: [PATCH 06/16] docs: modify HeartbeatLogEvent comments --- pymysqlreplication/event.py | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index affb6671..c581ccf8 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -216,22 +216,26 @@ def _dump(self): class HeartbeatLogEvent(BinLogEvent): """A Heartbeat event - Heartbeats are sent by the master only if there are no unsent events in the - binary log file for a period longer than the interval defined by - MASTER_HEARTBEAT_PERIOD connection setting. - - A mysql server will also play those to the slave for each skipped - events in the log. I (baloo) believe the intention is to make the slave - bump its position so that if a disconnection occurs, the slave only - reconnects from the last skipped position (see Binlog_sender::send_events - in sql/rpl_binlog_sender.cc). That makes 106 bytes of data for skipped - event in the binlog. *this is also the case with GTID replication*. To - mitigate such behavior, you are expected to keep the binlog small (see - max_binlog_size, defaults to 1G). - In any case, the timestamp is 0 (as in 1970-01-01T00:00:00). + Heartbeats are sent by the master. + Master sends heartbeats when there are no unsent events in the binary log file after certain period of time. + The interval is defined by MASTER_HEARTBEAT_PERIOD connection setting. - Attributes: - ident: Name of the current binlog + `[see MASTER_HEARTBEAT_PERIOD] `_. + + A Mysql server also does it for each skipped events in the log. + This is because to make the slave bump its position so that + if a disconnection occurs, the slave will only reconnects from the lasted skipped position. (Baloo's idea) + + (see Binlog_sender::send_events in sql/rpl_binlog_sender.cc). + + Warning: + That makes 106 bytes of data for skipped event in the binlog. + *this is also the case with GTID replication*. + To mitigate such behavior, you are expected to keep the binlog small + (see max_binlog_size, defaults to 1G). + In any case, the timestamp is 0 (as in 1970-01-01T00:00:00). + + :ivar ident: Name of the current binlog """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): From de0cc85f5407e3d3ac162846eba1359536654964 Mon Sep 17 00:00:00 2001 From: ebang Date: Fri, 25 Aug 2023 14:57:45 +0900 Subject: [PATCH 07/16] docs: modify XAPrepareEvent comments --- pymysqlreplication/event.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index c581ccf8..1f0e6229 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -150,11 +150,13 @@ def dump(self): class XAPrepareEvent(BinLogEvent): """An XA prepare event is generated for a XA prepared transaction. - Like Xid_event it contains XID of the *prepared* transaction + Like Xid_event, it contains XID of the **prepared** transaction. - Attributes: - one_phase: current XA transaction commit method - xid: serialized XID representation of XA transaction + For more information: `[see details] `_. + + :ivar one_phase: current XA transaction commit method + :ivar xid_format_id: a number that identifies the format used by the gtrid and bqual values + :ivar xid: serialized XID representation of XA transaction (xid_gtrid + xid_bqual) """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(XAPrepareEvent, self).__init__(from_packet, event_size, table_map, From 21ffd3b344964cfc08d76f4d0a6931771de9d13c Mon Sep 17 00:00:00 2001 From: ebang Date: Fri, 25 Aug 2023 14:58:32 +0900 Subject: [PATCH 08/16] docs: modify RotateEvent comments --- pymysqlreplication/event.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 1f0e6229..89fa9098 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -130,10 +130,12 @@ def _dump(self): class RotateEvent(BinLogEvent): """Change MySQL bin log file + Represents information for the slave to know the name of the binary log it is going to receive. - Attributes: - position: Position inside next binlog - next_binlog: Name of next binlog file + For more information: `[see details] `_. + + :ivar position: int - Position inside next binlog + :ivar next_binlog: str - Name of next binlog file """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(RotateEvent, self).__init__(from_packet, event_size, table_map, From bc6fbaab215e57ebd4bd423b5b8ded2e5c0dd21a Mon Sep 17 00:00:00 2001 From: mjs Date: Sun, 27 Aug 2023 19:46:08 +0900 Subject: [PATCH 09/16] docs: add FormatDescriptionEvent comment --- pymysqlreplication/event.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 89fa9098..ec43ead7 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -184,6 +184,16 @@ def _dump(self): class FormatDescriptionEvent(BinLogEvent): + """ + Represents a Format Description Event in the MySQL binary log. + + This event is written at the start of a binary log file for binlog version 4. + It provides the necessary information to decode subsequent events in the file. + + :ivar binlog_version: int - Version of the binary log format. + :ivar mysql_version_str: str - Server's MySQL version in string format. + """ + def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(FormatDescriptionEvent, self).__init__(from_packet, event_size, table_map, ctl_connection, **kwargs) From c6e9bc2b2b5a531e63877977751c7a1bf66ae9bc Mon Sep 17 00:00:00 2001 From: heehehe Date: Tue, 29 Aug 2023 01:23:31 +0900 Subject: [PATCH 10/16] docs: modify ExecuteLoadQueryEvent comment --- pymysqlreplication/event.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index ec43ead7..9feab4f8 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -305,8 +305,7 @@ def _read_status_vars_value_for_key(self, key): Parsing logic from mysql-server source code edited by dongwook-chan https://github.com/mysql/mysql-server/blob/beb865a960b9a8a16cf999c323e46c5b0c67f21f/libbinlogevents/src/statement_events.cpp#L181-L336 - Args: - key: key for status variable + :ivar key: key for status variable """ if key == Q_FLAGS2_CODE: # 0x00 self.flags2 = self.packet.read_uint32() @@ -409,18 +408,23 @@ def _dump(self): class ExecuteLoadQueryEvent(BinLogEvent): """ - - Attributes: - slave_proxy_id - execution_time - schema_length - error_code - status_vars_length - - file_id - start_pos - end_pos - dup_handling_flags + This event handles "LOAD DATA INFILE" statement. + LOAD DATA INFILE statement reads data from file and insert into database's table. + Since QueryEvent cannot explain this special action, ExecuteLoadQueryEvent is needed. + So it is similar to a QUERY_EVENT except that it has extra static fields. + + :ivar slave_proxy_id: int - The id of the thread that issued this statement on the master server + :ivar execution_time: int - The number of seconds that the statement took to execute + :ivar schema_length: int - The length of the default database's name when the statement was executed. + This name appears later, in the variable data part. + It is necessary for statements such as INSERT INTO t VALUES(1) that don't specify the database + and rely on the default database previously selected by USE + :ivar error_code: int - The error code resulting from execution of the statement on the master + :ivar status_vars_length: int - The length of the status variable block + :ivar file_id: int - The id of the loaded file + :ivar start_pos: int - Offset from the start of the statement to the beginning of the filename + :ivar end_pos: int - Offset from the start of the statement to the end of the filename + :ivar dup_handling_flags: int - How LOAD DATA INFILE handles duplicated data (0x0: error, 0x1: ignore, 0x2: replace) """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(ExecuteLoadQueryEvent, self).__init__(from_packet, event_size, table_map, From 95001ca7317c665d461baf79f73639b39d0fbdef Mon Sep 17 00:00:00 2001 From: heehehe Date: Tue, 29 Aug 2023 01:28:12 +0900 Subject: [PATCH 11/16] docs: remove unnecessary comments from ExecuteLoadQueryEvent --- pymysqlreplication/event.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 9feab4f8..ff12712a 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -416,9 +416,6 @@ class ExecuteLoadQueryEvent(BinLogEvent): :ivar slave_proxy_id: int - The id of the thread that issued this statement on the master server :ivar execution_time: int - The number of seconds that the statement took to execute :ivar schema_length: int - The length of the default database's name when the statement was executed. - This name appears later, in the variable data part. - It is necessary for statements such as INSERT INTO t VALUES(1) that don't specify the database - and rely on the default database previously selected by USE :ivar error_code: int - The error code resulting from execution of the statement on the master :ivar status_vars_length: int - The length of the status variable block :ivar file_id: int - The id of the loaded file From e67bb54a389555df8400532b13d21aa0787cea08 Mon Sep 17 00:00:00 2001 From: ebang Date: Tue, 29 Aug 2023 16:12:28 +0900 Subject: [PATCH 12/16] docs: modify XidEvent comments --- pymysqlreplication/event.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index ff12712a..671c0b69 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -213,9 +213,11 @@ class StopEvent(BinLogEvent): class XidEvent(BinLogEvent): """A COMMIT event + Generated when COMMIT of a transaction that modifies one or more tables of an XA-capable storage engine occurs. - Attributes: - xid: Transaction ID for 2PC + For more information : `[see details] `_. + + :ivar xid: uint - Transaction ID for 2 Phrase Commit. """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): From 9cb581c04df80cb5b61db9b9dc3dfe17892dc6b0 Mon Sep 17 00:00:00 2001 From: will-k Date: Wed, 30 Aug 2023 03:05:57 +0900 Subject: [PATCH 13/16] Add docstring to QueryEvent --- pymysqlreplication/event.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 671c0b69..f1c84748 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -266,8 +266,19 @@ def _dump(self): class QueryEvent(BinLogEvent): - '''This event is trigger when a query is run of the database. - Only replicated queries are logged.''' + """ + QueryEvent is generated for each query that modified database. + If row-based replication is used, DML will not be logged as RowsEvent instead. + + :ivar slave_proxy_id: int - The id of the thread that issued this statement on the master server + :ivar execution_time: int - The time from when the query started to when it was logged in the binlog, in seconds. + :ivar schema_length: int - The length of the name of the currently selected database. + :ivar error_code: int - Error code generated by the master + :ivar status_vars_length: int - The length of the status variable + + :ivar schema: str - The name of the currently selected database. + :ivar query: str - The query executed. + """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super(QueryEvent, self).__init__(from_packet, event_size, table_map, ctl_connection, **kwargs) From 0199f1672d4efd29052027aed6488fc13714fe4d Mon Sep 17 00:00:00 2001 From: heehehe Date: Wed, 30 Aug 2023 10:56:01 +0900 Subject: [PATCH 14/16] fix: modify tab indentation to spaces --- pymysqlreplication/event.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index e42beafb..5f011710 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -59,7 +59,7 @@ class GtidEvent(BinLogEvent): :ivar commit_flag: 1byte - 00000001 = Transaction may have changes logged with SBR. In 5.6, 5.7.0-5.7.18, and 8.0.0-8.0.1, this flag is always set. Starting in 5.7.19 and 8.0.2, this flag is cleared if the transaction only contains row events. It is set if any part of the transaction is written in statement format. - :ivar sid: 16 byte sequence - UUID representing the SID + :ivar sid: 16 byte sequence - UUID representing the SID :ivar gno: int - Group number, second component of GTID. :ivar lt_type: int(1 byte) - The type of logical timestamp used in the logical clock fields. :ivar last_committed: Store the transaction's commit parent sequence_number @@ -313,7 +313,7 @@ class HeartbeatLogEvent(BinLogEvent): This is because to make the slave bump its position so that if a disconnection occurs, the slave will only reconnects from the lasted skipped position. (Baloo's idea) - (see Binlog_sender::send_events in sql/rpl_binlog_sender.cc). + (see Binlog_sender::send_events in sql/rpl_binlog_sender.cc) Warning: That makes 106 bytes of data for skipped event in the binlog. @@ -543,7 +543,7 @@ class IntvarEvent(BinLogEvent): This event will be created just before a QueryEvent. :ivar type: int - 1 byte identifying the type of variable stored. - Can be either LAST_INSERT_ID_EVENT (1) or INSERT_ID_EVENT (2). + Can be either LAST_INSERT_ID_EVENT (1) or INSERT_ID_EVENT (2). :ivar value: int - The value of the variable """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): @@ -649,7 +649,7 @@ class NotImplementedEvent(BinLogEvent): """ Used as a temporary class for events that have not yet been implemented. - The event referencing this class skips parsing. + The event referencing this class skips parsing. """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super().__init__( From b52c4d7416ce9b8e10d373e22487f40bc092cb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=80=EC=A0=95=20=EB=B0=A9?= <108053947+ebang091@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:28:43 +0900 Subject: [PATCH 15/16] docs: modify XidEvent comments --- pymysqlreplication/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 5f011710..7903f8d0 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -288,7 +288,7 @@ class XidEvent(BinLogEvent): For more information : `[see details] `_. - :ivar xid: uint - Transaction ID for 2 Phrase Commit. + :ivar xid: uint - Transaction ID for 2 Phase Commit. """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): From 1c8eca80365871bc8ae8fcb0c99ab05f7405a9ce Mon Sep 17 00:00:00 2001 From: Heeseon Cheon Date: Thu, 31 Aug 2023 22:21:41 +0900 Subject: [PATCH 16/16] docs: add newline when starting docstring --- pymysqlreplication/event.py | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/pymysqlreplication/event.py b/pymysqlreplication/event.py index 7903f8d0..09a05cf5 100644 --- a/pymysqlreplication/event.py +++ b/pymysqlreplication/event.py @@ -53,9 +53,10 @@ def _dump(self): class GtidEvent(BinLogEvent): - """GTID change in binlog event + """ + GTID change in binlog event - For more information : `[GTID] `_ `[see also] `_ + For more information: `[GTID] `_ `[see also] `_ :ivar commit_flag: 1byte - 00000001 = Transaction may have changes logged with SBR. In 5.6, 5.7.0-5.7.18, and 8.0.0-8.0.1, this flag is always set. Starting in 5.7.19 and 8.0.2, this flag is cleared if the transaction only contains row events. It is set if any part of the transaction is written in statement format. @@ -80,7 +81,8 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs) @property def gtid(self): - """GTID = source_id:transaction_id + """ + GTID = source_id:transaction_id Eg: 3E11FA47-71CA-11E1-9E33-C80AA9429562:23 See: http://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html""" nibbles = binascii.hexlify(self.sid).decode('ascii') @@ -104,7 +106,7 @@ class MariadbGtidEvent(BinLogEvent): """ GTID(Global Transaction Identifier) change in binlog event in MariaDB - for more information: `[see details] `_. + For more information: `[see details] `_. :ivar server_id: int - The ID of the server where the GTID event occurred. :ivar gtid_seq_no: int - The sequence number of the GTID event. @@ -134,7 +136,7 @@ class MariadbBinLogCheckPointEvent(BinLogEvent): More details are available in the MariaDB Knowledge Base: https://mariadb.com/kb/en/binlog_checkpoint_event/ - :ivar filename_length: int - The length of the filename. + :ivar filename_length: int - The length of the filename. :ivar filename: str - The name of the file saved at the checkpoint. """ @@ -153,8 +155,7 @@ class MariadbAnnotateRowsEvent(BinLogEvent): If you want to check this binlog, change the value of the flag(line 382 of the 'binlogstream.py') option to 2 https://mariadb.com/kb/en/annotate_rows_event/ - Attributes: - sql_statement: The SQL statement + :ivar sql_statement: str - The SQL statement """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): super().__init__(from_packet, event_size, table_map, ctl_connection, **kwargs) @@ -169,15 +170,14 @@ class MariadbGtidListEvent(BinLogEvent): GTID List event https://mariadb.com/kb/en/gtid_list_event/ - Attributes: - gtid_length: Number of GTIDs - gtid_list: list of 'MariadbGtidObejct' + :ivar gtid_length: int - Number of GTIDs + :ivar gtid_list: list - list of 'MariadbGtidObejct' - 'MariadbGtidObejct' Attributes: - domain_id: Replication Domain ID - server_id: Server_ID - gtid_seq_no: GTID sequence - gtid: 'domain_id'+ 'server_id' + 'gtid_seq_no' + 'MariadbGtidObejct' Attributes: + domain_id: Replication Domain ID + server_id: Server_ID + gtid_seq_no: GTID sequence + gtid: 'domain_id'+ 'server_id' + 'gtid_seq_no' """ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs): @@ -200,7 +200,8 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs) class RotateEvent(BinLogEvent): - """Change MySQL bin log file + """ + Change MySQL bin log file Represents information for the slave to know the name of the binary log it is going to receive. For more information: `[see details] `_. @@ -222,7 +223,8 @@ def dump(self): class XAPrepareEvent(BinLogEvent): - """An XA prepare event is generated for a XA prepared transaction. + """ + An XA prepare event is generated for a XA prepared transaction. Like Xid_event, it contains XID of the **prepared** transaction. For more information: `[see details] `_. @@ -283,10 +285,10 @@ class StopEvent(BinLogEvent): class XidEvent(BinLogEvent): - """A COMMIT event - Generated when COMMIT of a transaction that modifies one or more tables of an XA-capable storage engine occurs. + """ + A COMMIT event generated when COMMIT of a transaction that modifies one or more tables of an XA-capable storage engine occurs. - For more information : `[see details] `_. + For more information: `[see details] `_. :ivar xid: uint - Transaction ID for 2 Phase Commit. """