34#ifndef ROWS_EVENT_INCLUDED
35#define ROWS_EVENT_INCLUDED
46#define EXTRA_ROW_INFO_LEN_OFFSET 0
47#define EXTRA_ROW_INFO_FORMAT_OFFSET 1
48#define EXTRA_ROW_INFO_HEADER_LENGTH 2
49#define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HEADER_LENGTH)
51#define ROWS_MAPID_OFFSET 0
52#define ROWS_FLAGS_OFFSET 6
53#define ROWS_VHLEN_OFFSET 8
54#define EXTRA_ROW_INFO_TYPECODE_LENGTH 1
55#define EXTRA_ROW_PART_INFO_VALUE_LENGTH 2
577 typedef std::pair<unsigned int, unsigned int>
uint_pair;
621 unsigned int optional_metadata_len);
650 size_t dblen,
const char *tblnam,
size_t tbllen)
707 void print_event_info(std::ostream &
info)
override;
708 void print_long_info(std::ostream &
info)
override;
996 static_cast<unsigned char *
>(
bapi_malloc(len, 16 ));
1011 int part_id_arg,
int source_part_id);
1033 std::string
str =
"";
1040 str.append(
"Unknown Flag");
1044 void print_event_info(std::ostream &
info)
override;
1045 void print_long_info(std::ostream &
info)
override;
1048 template <
class Iterator_value_type>
Each table share has a table id, it is mainly used for row based replication.
Definition: table_id.h:39
unsigned long long id() const
Definition: table_id.h:49
This is the abstract base class for binary log events.
Definition: binlog_event.h:806
Log row deletions.
Definition: rows_event.h:1097
Delete_rows_event()
Definition: rows_event.h:1100
Base class for ignorable log events.
Definition: control_events.h:665
Common base class for all row-containing binary log events.
Definition: rows_event.h:878
uint16_t m_flags
Definition: rows_event.h:947
unsigned long long get_table_id() const
Definition: rows_event.h:1024
enum_flag get_flags() const
Definition: rows_event.h:1026
enum_flag
These definitions allow to combine the flags into an appropriate flag set using the normal bitwise op...
Definition: rows_event.h:887
@ STMT_END_F
Last event of a statement.
Definition: rows_event.h:889
@ NO_FOREIGN_KEY_CHECKS_F
Value of the OPTION_NO_FOREIGN_KEY_CHECKS flag in thd->options.
Definition: rows_event.h:891
@ 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:898
@ RELAXED_UNIQUE_CHECKS_F
Value of the OPTION_RELAXED_UNIQUE_CHECKS flag in thd->options.
Definition: rows_event.h:893
uint32_t n_bits_len
The width of the columns bitmap.
Definition: rows_event.h:951
std::vector< uint8_t > columns_after_image
Definition: rows_event.h:955
Log_event_type m_type
Definition: rows_event.h:943
static std::string get_flag_string(enum_flag flag)
Definition: rows_event.h:1032
unsigned long m_width
Flags for row-level events.
Definition: rows_event.h:950
unsigned long get_width() const
Definition: rows_event.h:1030
friend class Row_event_iterator
Definition: rows_event.h:1049
uint16_t var_header_len
value determined by (m_width + 7) / 8
Definition: rows_event.h:952
uint32_t get_null_bits_len() const
Definition: rows_event.h:1028
Rows_event(Log_event_type type_arg)
Constructs an event directly.
Definition: rows_event.h:910
std::vector< uint8_t > columns_before_image
Definition: rows_event.h:954
Table_id m_table_id
Actual event type.
Definition: rows_event.h:946
Extra_row_info m_extra_row_info
Definition: rows_event.h:1022
std::vector< uint8_t > row
Definition: rows_event.h:956
Rows query event type, which is a subclass of the Ignorable_event, to record the original query for t...
Definition: rows_event.h:1133
~Rows_query_event() override
Definition: rows_event.cpp:549
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:1155
char * m_rows_query
Definition: rows_event.h:1161
In row-based mode, every row operation event is preceded by a Table_map_event which maps a table defi...
Definition: rows_event.h:523
unsigned char * m_optional_metadata
Definition: rows_event.h:691
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:546
@ ENUM_AND_SET_COLUMN_CHARSET
Definition: rows_event.h:564
@ SIGNEDNESS
Definition: rows_event.h:547
@ DEFAULT_CHARSET
Definition: rows_event.h:548
@ SET_STR_VALUE
Definition: rows_event.h:555
@ COLUMN_NAME
Definition: rows_event.h:554
@ SIMPLE_PRIMARY_KEY
Definition: rows_event.h:558
@ ENUM_AND_SET_DEFAULT_CHARSET
Definition: rows_event.h:560
@ GEOMETRY_TYPE
Definition: rows_event.h:557
@ ENUM_STR_VALUE
Definition: rows_event.h:556
@ COLUMN_CHARSET
Definition: rows_event.h:551
@ COLUMN_VISIBILITY
Definition: rows_event.h:568
@ PRIMARY_KEY_WITH_PREFIX
Definition: rows_event.h:559
unsigned long m_field_metadata_size
The size of field metadata buffer set by calling save_field_metadata()
Definition: rows_event.h:687
~Table_map_event() override
Definition: rows_event.cpp:105
std::string m_dbnam
event data size
Definition: rows_event.h:677
uint16_t flag_set
Definition: rows_event.h:532
unsigned char * m_null_bits
field metadata
Definition: rows_event.h:689
unsigned char * m_field_metadata
Definition: rows_event.h:688
unsigned long long int m_tbllen
Definition: rows_event.h:680
unsigned long m_colcnt
Definition: rows_event.h:681
Table_map_event()
Definition: rows_event.h:693
unsigned int m_optional_metadata_len
Definition: rows_event.h:690
Table_map_event_offset
Constants representing offsets.
Definition: rows_event.h:526
@ TM_MAPID_OFFSET
TM = "Table Map".
Definition: rows_event.h:528
@ TM_FLAGS_OFFSET
Definition: rows_event.h:529
unsigned char * m_coltype
Definition: rows_event.h:682
flag_set m_flags
Definition: rows_event.h:672
std::string m_tblnam
Definition: rows_event.h:679
std::string get_table_name()
Definition: rows_event.h:703
size_t m_data_size
Definition: rows_event.h:674
std::string get_db_name()
Definition: rows_event.h:704
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:649
unsigned long long int m_dblen
Definition: rows_event.h:678
Table_id m_table_id
Event post header contents.
Definition: rows_event.h:671
unsigned long long get_table_id()
Definition: rows_event.h:702
Log row updates with a before image.
Definition: rows_event.h:1078
Update_rows_event(Log_event_type event_type)
Definition: rows_event.h:1081
Update_rows_event(const char *buf, const Format_description_event *fde)
Definition: rows_event.cpp:562
Log row insertions.
Definition: rows_event.h:1060
Write_rows_event()
Definition: rows_event.h:1063
Contains the classes representing events operating in the replication stream properties.
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
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:62
static int flag
Definition: hp_test1.cc:39
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1063
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:274
@ TABLE_MAP_EVENT
Definition: binlog_event.h:305
@ DELETE_ROWS_EVENT
Definition: binlog_event.h:337
@ ROWS_QUERY_LOG_EVENT
Definition: binlog_event.h:332
@ WRITE_ROWS_EVENT
Version 2 of the Row events.
Definition: binlog_event.h:335
Definition: buf0block_hint.cc:29
Contains the class Table_id, mainly used for row based replication.
#define BAPI_ASSERT(x)
Definition: wrapper_functions.h:61
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:169