35#ifndef ROWS_EVENT_INCLUDED
36#define ROWS_EVENT_INCLUDED
47#define EXTRA_ROW_INFO_LEN_OFFSET 0
48#define EXTRA_ROW_INFO_FORMAT_OFFSET 1
49#define EXTRA_ROW_INFO_HEADER_LENGTH 2
50#define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HEADER_LENGTH)
52#define ROWS_MAPID_OFFSET 0
53#define ROWS_FLAGS_OFFSET 6
54#define ROWS_VHLEN_OFFSET 8
55#define EXTRA_ROW_INFO_TYPECODE_LENGTH 1
56#define EXTRA_ROW_PART_INFO_VALUE_LENGTH 2
578 typedef std::pair<unsigned int, unsigned int>
uint_pair;
622 unsigned int optional_metadata_len);
651 size_t dblen,
const char *tblnam,
size_t tbllen)
708 void print_event_info(std::ostream &
info)
override;
709 void print_long_info(std::ostream &
info)
override;
997 static_cast<unsigned char *
>(
bapi_malloc(len, 16 ));
1012 int part_id_arg,
int source_part_id);
1034 std::string
str =
"";
1041 str.append(
"Unknown Flag");
1045 void print_event_info(std::ostream &
info)
override;
1046 void print_long_info(std::ostream &
info)
override;
1049 template <
class Iterator_value_type>
Each table share has a table id, it is mainly used for row based replication.
Definition: table_id.h:40
unsigned long long id() const
Definition: table_id.h:50
This is the abstract base class for binary log events.
Definition: binlog_event.h:826
Log row deletions.
Definition: rows_event.h:1098
Delete_rows_event()
Definition: rows_event.h:1101
Base class for ignorable log events.
Definition: control_events.h:666
Common base class for all row-containing binary log events.
Definition: rows_event.h:879
uint16_t m_flags
Definition: rows_event.h:948
unsigned long long get_table_id() const
Definition: rows_event.h:1025
enum_flag get_flags() const
Definition: rows_event.h:1027
enum_flag
These definitions allow to combine the flags into an appropriate flag set using the normal bitwise op...
Definition: rows_event.h:888
@ STMT_END_F
Last event of a statement.
Definition: rows_event.h:890
@ NO_FOREIGN_KEY_CHECKS_F
Value of the OPTION_NO_FOREIGN_KEY_CHECKS flag in thd->options.
Definition: rows_event.h:892
@ COMPLETE_ROWS_F
Indicates that rows in this event are complete, that is contain values for all columns of the table.
Definition: rows_event.h:899
@ RELAXED_UNIQUE_CHECKS_F
Value of the OPTION_RELAXED_UNIQUE_CHECKS flag in thd->options.
Definition: rows_event.h:894
uint32_t n_bits_len
The width of the columns bitmap.
Definition: rows_event.h:952
std::vector< uint8_t > columns_after_image
Definition: rows_event.h:956
Log_event_type m_type
Definition: rows_event.h:944
static std::string get_flag_string(enum_flag flag)
Definition: rows_event.h:1033
unsigned long m_width
Flags for row-level events.
Definition: rows_event.h:951
unsigned long get_width() const
Definition: rows_event.h:1031
friend class Row_event_iterator
Definition: rows_event.h:1050
uint16_t var_header_len
value determined by (m_width + 7) / 8
Definition: rows_event.h:953
uint32_t get_null_bits_len() const
Definition: rows_event.h:1029
Rows_event(Log_event_type type_arg)
Constructs an event directly.
Definition: rows_event.h:911
std::vector< uint8_t > columns_before_image
Definition: rows_event.h:955
Table_id m_table_id
Actual event type.
Definition: rows_event.h:947
Extra_row_info m_extra_row_info
Definition: rows_event.h:1023
std::vector< uint8_t > row
Definition: rows_event.h:957
Rows query event type, which is a subclass of the Ignorable_event, to record the original query for t...
Definition: rows_event.h:1134
~Rows_query_event() override
Definition: rows_event.cpp:550
Rows_query_event()
It is the minimal constructor, and all it will do is set the type_code as ROWS_QUERY_LOG_EVENT in the...
Definition: rows_event.h:1156
char * m_rows_query
Definition: rows_event.h:1162
In row-based mode, every row operation event is preceded by a Table_map_event which maps a table defi...
Definition: rows_event.h:524
unsigned char * m_optional_metadata
Definition: rows_event.h:692
Optional_metadata_field_type
DEFAULT_CHARSET and COLUMN_CHARSET don't appear together, and ENUM_AND_SET_DEFAULT_CHARSET and ENUM_A...
Definition: rows_event.h:547
@ ENUM_AND_SET_COLUMN_CHARSET
Definition: rows_event.h:565
@ SIGNEDNESS
Definition: rows_event.h:548
@ DEFAULT_CHARSET
Definition: rows_event.h:549
@ SET_STR_VALUE
Definition: rows_event.h:556
@ COLUMN_NAME
Definition: rows_event.h:555
@ SIMPLE_PRIMARY_KEY
Definition: rows_event.h:559
@ ENUM_AND_SET_DEFAULT_CHARSET
Definition: rows_event.h:561
@ GEOMETRY_TYPE
Definition: rows_event.h:558
@ ENUM_STR_VALUE
Definition: rows_event.h:557
@ COLUMN_CHARSET
Definition: rows_event.h:552
@ COLUMN_VISIBILITY
Definition: rows_event.h:569
@ PRIMARY_KEY_WITH_PREFIX
Definition: rows_event.h:560
unsigned long m_field_metadata_size
The size of field metadata buffer set by calling save_field_metadata()
Definition: rows_event.h:688
~Table_map_event() override
Definition: rows_event.cpp:106
std::string m_dbnam
event data size
Definition: rows_event.h:678
uint16_t flag_set
Definition: rows_event.h:533
unsigned char * m_null_bits
field metadata
Definition: rows_event.h:690
unsigned char * m_field_metadata
Definition: rows_event.h:689
unsigned long long int m_tbllen
Definition: rows_event.h:681
unsigned long m_colcnt
Definition: rows_event.h:682
Table_map_event()
Definition: rows_event.h:694
unsigned int m_optional_metadata_len
Definition: rows_event.h:691
Table_map_event_offset
Constants representing offsets.
Definition: rows_event.h:527
@ TM_MAPID_OFFSET
TM = "Table Map".
Definition: rows_event.h:529
@ TM_FLAGS_OFFSET
Definition: rows_event.h:530
unsigned char * m_coltype
Definition: rows_event.h:683
flag_set m_flags
Definition: rows_event.h:673
std::string m_tblnam
Definition: rows_event.h:680
std::string get_table_name()
Definition: rows_event.h:704
size_t m_data_size
Definition: rows_event.h:675
std::string get_db_name()
Definition: rows_event.h:705
Table_map_event(const Table_id &tid, unsigned long colcnt, const char *dbnam, size_t dblen, const char *tblnam, size_t tbllen)
Definition: rows_event.h:650
unsigned long long int m_dblen
Definition: rows_event.h:679
Table_id m_table_id
Event post header contents.
Definition: rows_event.h:672
unsigned long long get_table_id()
Definition: rows_event.h:703
Log row updates with a before image.
Definition: rows_event.h:1079
Update_rows_event(Log_event_type event_type)
Definition: rows_event.h:1082
Update_rows_event(const char *buf, const Format_description_event *fde)
Definition: rows_event.cpp:563
Log row insertions.
Definition: rows_event.h:1061
Write_rows_event()
Definition: rows_event.h:1064
Contains the classes representing events operating in the replication stream properties.
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
enum_extra_row_info_typecode
This is the typecode defined for the different elements present in the container Extra_row_info,...
Definition: rows_event.h:63
static int flag
Definition: hp_test1.cc:40
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
The namespace contains classes representing events that can occur in a replication stream.
Log_event_type
Enumeration type for the different types of log events.
Definition: binlog_event.h:275
@ TABLE_MAP_EVENT
Definition: binlog_event.h:306
@ DELETE_ROWS_EVENT
Definition: binlog_event.h:338
@ ROWS_QUERY_LOG_EVENT
Definition: binlog_event.h:333
@ WRITE_ROWS_EVENT
Version 2 of the Row events.
Definition: binlog_event.h:336
Definition: buf0block_hint.cc:30
Contains the class Table_id, mainly used for row based replication.
#define BAPI_ASSERT(x)
Definition: wrapper_functions.h:62
void * bapi_malloc(size_t size, int flags)
This is a wrapper function in order to allocate memory from the heap in the binlogevent library.
Definition: wrapper_functions.h:192