35#ifndef TRX_BOUNDARY_PARSER_H
36#define TRX_BOUNDARY_PARSER_H
140 bool throw_warnings);
285 bool throw_warnings);
This is the base class for verifying transaction boundaries.
Definition: trx_boundary_parser.h:47
void rollback()
Rolls back to the last parser state.
Definition: trx_boundary_parser.h:160
enum_event_boundary_type
Definition: trx_boundary_parser.h:179
@ EVENT_BOUNDARY_TYPE_GTID
Definition: trx_boundary_parser.h:182
@ EVENT_BOUNDARY_TYPE_ERROR
Definition: trx_boundary_parser.h:180
@ EVENT_BOUNDARY_TYPE_BEGIN_TRX
Definition: trx_boundary_parser.h:184
@ EVENT_BOUNDARY_TYPE_TRANSACTION_PAYLOAD
Definition: trx_boundary_parser.h:207
@ EVENT_BOUNDARY_TYPE_PRE_STATEMENT
Definition: trx_boundary_parser.h:191
@ EVENT_BOUNDARY_TYPE_INCIDENT
Definition: trx_boundary_parser.h:198
@ EVENT_BOUNDARY_TYPE_END_XA_TRX
Definition: trx_boundary_parser.h:189
@ EVENT_BOUNDARY_TYPE_IGNORE
Definition: trx_boundary_parser.h:203
@ EVENT_BOUNDARY_TYPE_STATEMENT
Definition: trx_boundary_parser.h:196
@ EVENT_BOUNDARY_TYPE_END_TRX
Definition: trx_boundary_parser.h:187
enum_event_parser_state last_parser_state
Last internal state of the event parser.
Definition: trx_boundary_parser.h:251
bool is_error()
State if the transaction boundary parser was fed with a sequence of events that the parser wasn't abl...
Definition: trx_boundary_parser.h:120
bool feed_event(binary_log::Log_event_basic_info log_event_info, bool throw_warnings)
Feed the transaction boundary parser with a Log_event of any type in object type.
Definition: trx_boundary_parser.cpp:60
bool update_state(enum_event_boundary_type event_boundary_type, bool throw_warnings)
Set the boundary parser state based on the event parser logic.
Definition: trx_boundary_parser.cpp:292
bool is_not_inside_transaction()
State if the transaction boundary parser is not inside a transaction.
Definition: trx_boundary_parser.h:109
enum_event_parser_error
Internal error indentifiers for parser issues.
Definition: trx_boundary_parser.h:165
@ ER_TRX_BOUND_UNEXPECTED_XA_ROLLBACK_IN_STREAM
Definition: trx_boundary_parser.h:175
@ ER_TRX_BOUND_GTID_LOG_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:169
@ ER_TRX_BOUND_UNEXPECTED_BEGIN_IN_STREAM
Definition: trx_boundary_parser.h:171
@ ER_TRX_BOUND_UNSUPPORTED_UNIGNORABLE_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:167
@ ER_TRX_BOUND_UNEXPECTED_COMMIT_ROLLBACK_OR_XID_LOG_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:173
enum_event_parser_state current_parser_state
Current internal state of the event parser.
Definition: trx_boundary_parser.h:244
enum_event_boundary_type m_current_boundary_state
The last processed boundary event type.
Definition: trx_boundary_parser.h:256
bool check_row_logging_constraints(binary_log::Log_event_basic_info event_info)
Evaluate given the current info about boundary type, event type and parser state if the given event v...
Definition: trx_boundary_parser.cpp:69
bool is_inside_transaction()
State if the transaction boundary parser is inside a transaction.
Definition: trx_boundary_parser.h:96
virtual ~Transaction_boundary_parser()
Destructor.
Transaction_boundary_parser(enum_trx_boundary_parser_context context)
Constructor.
Definition: trx_boundary_parser.h:63
virtual void log_server_warning(int error, const char *message)
Log warnings using some defined logging interface.
Definition: trx_boundary_parser.cpp:528
enum_event_parser_state
Definition: trx_boundary_parser.h:228
@ EVENT_PARSER_DDL
Definition: trx_boundary_parser.h:234
@ EVENT_PARSER_GTID
Definition: trx_boundary_parser.h:232
@ EVENT_PARSER_DML
Definition: trx_boundary_parser.h:236
@ EVENT_PARSER_ERROR
Definition: trx_boundary_parser.h:238
@ EVENT_PARSER_NONE
Definition: trx_boundary_parser.h:230
enum_event_boundary_type get_event_boundary_type(binary_log::Log_event_basic_info event_info, bool throw_warnings)
Parses an raw event based on the event parser logic.
Definition: trx_boundary_parser.cpp:134
enum_trx_boundary_parser_context m_trx_boundary_parser_context
In which context of the boundary parser is used.
Definition: trx_boundary_parser.h:261
void reset()
Reset the transaction boundary parser state.
Definition: trx_boundary_parser.cpp:50
enum_trx_boundary_parser_context
The context where the parser is used.
Definition: trx_boundary_parser.h:52
@ TRX_BOUNDARY_PARSER_RECEIVER
Definition: trx_boundary_parser.h:54
@ TRX_BOUNDARY_PARSER_APPLIER
Definition: trx_boundary_parser.h:56
Contains the classes representing events operating in the replication stream properties.
Struct to pass basic information about a event: type, query, is it ignorable.
Definition: binlog_event.h:370