36#ifndef TRX_BOUNDARY_PARSER_H
37#define TRX_BOUNDARY_PARSER_H
141 bool throw_warnings);
286 bool throw_warnings);
This is the base class for verifying transaction boundaries.
Definition: trx_boundary_parser.h:48
void rollback()
Rolls back to the last parser state.
Definition: trx_boundary_parser.h:161
enum_event_boundary_type
Definition: trx_boundary_parser.h:180
@ EVENT_BOUNDARY_TYPE_GTID
Definition: trx_boundary_parser.h:183
@ EVENT_BOUNDARY_TYPE_ERROR
Definition: trx_boundary_parser.h:181
@ EVENT_BOUNDARY_TYPE_BEGIN_TRX
Definition: trx_boundary_parser.h:185
@ EVENT_BOUNDARY_TYPE_TRANSACTION_PAYLOAD
Definition: trx_boundary_parser.h:208
@ EVENT_BOUNDARY_TYPE_PRE_STATEMENT
Definition: trx_boundary_parser.h:192
@ EVENT_BOUNDARY_TYPE_INCIDENT
Definition: trx_boundary_parser.h:199
@ EVENT_BOUNDARY_TYPE_END_XA_TRX
Definition: trx_boundary_parser.h:190
@ EVENT_BOUNDARY_TYPE_IGNORE
Definition: trx_boundary_parser.h:204
@ EVENT_BOUNDARY_TYPE_STATEMENT
Definition: trx_boundary_parser.h:197
@ EVENT_BOUNDARY_TYPE_END_TRX
Definition: trx_boundary_parser.h:188
enum_event_parser_state last_parser_state
Last internal state of the event parser.
Definition: trx_boundary_parser.h:252
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:121
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:61
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:293
bool is_not_inside_transaction()
State if the transaction boundary parser is not inside a transaction.
Definition: trx_boundary_parser.h:110
enum_event_parser_error
Internal error indentifiers for parser issues.
Definition: trx_boundary_parser.h:166
@ ER_TRX_BOUND_UNEXPECTED_XA_ROLLBACK_IN_STREAM
Definition: trx_boundary_parser.h:176
@ ER_TRX_BOUND_GTID_LOG_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:170
@ ER_TRX_BOUND_UNEXPECTED_BEGIN_IN_STREAM
Definition: trx_boundary_parser.h:172
@ ER_TRX_BOUND_UNSUPPORTED_UNIGNORABLE_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:168
@ ER_TRX_BOUND_UNEXPECTED_COMMIT_ROLLBACK_OR_XID_LOG_EVENT_IN_STREAM
Definition: trx_boundary_parser.h:174
enum_event_parser_state current_parser_state
Current internal state of the event parser.
Definition: trx_boundary_parser.h:245
enum_event_boundary_type m_current_boundary_state
The last processed boundary event type.
Definition: trx_boundary_parser.h:257
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:70
bool is_inside_transaction()
State if the transaction boundary parser is inside a transaction.
Definition: trx_boundary_parser.h:97
virtual ~Transaction_boundary_parser()
Destructor.
Transaction_boundary_parser(enum_trx_boundary_parser_context context)
Constructor.
Definition: trx_boundary_parser.h:64
virtual void log_server_warning(int error, const char *message)
Log warnings using some defined logging interface.
Definition: trx_boundary_parser.cpp:529
enum_event_parser_state
Definition: trx_boundary_parser.h:229
@ EVENT_PARSER_DDL
Definition: trx_boundary_parser.h:235
@ EVENT_PARSER_GTID
Definition: trx_boundary_parser.h:233
@ EVENT_PARSER_DML
Definition: trx_boundary_parser.h:237
@ EVENT_PARSER_ERROR
Definition: trx_boundary_parser.h:239
@ EVENT_PARSER_NONE
Definition: trx_boundary_parser.h:231
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:135
enum_trx_boundary_parser_context m_trx_boundary_parser_context
In which context of the boundary parser is used.
Definition: trx_boundary_parser.h:262
void reset()
Reset the transaction boundary parser state.
Definition: trx_boundary_parser.cpp:51
enum_trx_boundary_parser_context
The context where the parser is used.
Definition: trx_boundary_parser.h:53
@ TRX_BOUNDARY_PARSER_RECEIVER
Definition: trx_boundary_parser.h:55
@ TRX_BOUNDARY_PARSER_APPLIER
Definition: trx_boundary_parser.h:57
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:385