31#ifndef MYSQL_BINLOG_EVENT_ROWS_EVENT_H
32#define MYSQL_BINLOG_EVENT_ROWS_EVENT_H
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;
1002 static_cast<unsigned char *
>(
bapi_malloc(len, 16 ));
1017 int part_id_arg,
int source_part_id);
1049 std::stringstream ss;
1057 auto unknown_flags =
m_flags & ~ALL_FLAGS;
1058 ss <<
" UNKNOWN_FLAG(" << std::hex <<
"0x" << unknown_flags <<
")";
1072 std::string
str =
"";
1081 void print_event_info(std::ostream &
info)
override;
1082 void print_long_info(std::ostream &
info)
override;
1085 template <
class Iterator_value_type>
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
This is the abstract base class for binary log events.
Definition: binlog_event.h:857
Log row deletions.
Definition: rows_event.h:1134
Delete_rows_event()
Definition: rows_event.h:1137
Base class for ignorable log events.
Definition: control_events.h:673
Common base class for all row-containing binary log events.
Definition: rows_event.h:879
unsigned long m_width
Flags for row-level events.
Definition: rows_event.h:956
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
@ RELAXED_UNIQUE_CHECKS_F
Value of the OPTION_RELAXED_UNIQUE_CHECKS flag in thd->options.
Definition: rows_event.h:894
@ ALL_FLAGS
Flags for everything.
Definition: rows_event.h:903
@ 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
unsigned long long get_table_id() const
Definition: rows_event.h:1030
std::string get_enum_flag_string() const
Gets the flags listed as strings.
Definition: rows_event.h:1045
Rows_event(Log_event_type type_arg)
Constructs an event directly.
Definition: rows_event.h:916
uint16_t var_header_len
value determined by (m_width + 7) / 8
Definition: rows_event.h:958
uint32_t n_bits_len
The width of the columns bitmap.
Definition: rows_event.h:957
unsigned long get_width() const
Definition: rows_event.h:1036
Table_id m_table_id
Actual event type.
Definition: rows_event.h:952
std::vector< uint8_t > row
Definition: rows_event.h:962
Extra_row_info m_extra_row_info
Definition: rows_event.h:1028
uint32_t get_null_bits_len() const
Definition: rows_event.h:1034
friend class Row_event_iterator
Definition: rows_event.h:1086
enum_flag get_flags() const
Definition: rows_event.h:1032
static std::string get_flag_string(enum_flag flag)
Gets a string describing the flags.
Definition: rows_event.h:1069
Log_event_type m_type
Definition: rows_event.h:949
std::vector< uint8_t > columns_after_image
Definition: rows_event.h:961
uint16_t m_flags
Definition: rows_event.h:953
std::vector< uint8_t > columns_before_image
Definition: rows_event.h:960
Rows query event type, which is a subclass of the Ignorable_event, to record the original query for t...
Definition: rows_event.h:1170
char * m_rows_query
Definition: rows_event.h:1198
~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:1192
Each table share has a table id, it is mainly used for row based replication.
Definition: table_id.h:41
unsigned long long id() const
Definition: table_id.h:51
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_coltype
Definition: rows_event.h:683
Table_map_event()
Definition: rows_event.h:694
std::string m_tblnam
Definition: rows_event.h:680
std::string get_table_name()
Definition: rows_event.h:704
uint16_t flag_set
Definition: rows_event.h:533
unsigned char * m_null_bits
field metadata
Definition: rows_event.h:690
unsigned long long get_table_id()
Definition: rows_event.h:703
unsigned long long int m_dblen
Definition: rows_event.h:679
unsigned long long int m_tbllen
Definition: rows_event.h:681
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
@ PRIMARY_KEY_WITH_PREFIX
Definition: rows_event.h:560
@ COLUMN_CHARSET
Definition: rows_event.h:552
@ SET_STR_VALUE
Definition: rows_event.h:556
@ COLUMN_VISIBILITY
Definition: rows_event.h:569
@ ENUM_AND_SET_DEFAULT_CHARSET
Definition: rows_event.h:561
@ SIMPLE_PRIMARY_KEY
Definition: rows_event.h:559
@ ENUM_AND_SET_COLUMN_CHARSET
Definition: rows_event.h:565
@ ENUM_STR_VALUE
Definition: rows_event.h:557
@ SIGNEDNESS
Definition: rows_event.h:548
@ DEFAULT_CHARSET
Definition: rows_event.h:549
@ GEOMETRY_TYPE
Definition: rows_event.h:558
@ COLUMN_NAME
Definition: rows_event.h:555
unsigned long m_colcnt
Definition: rows_event.h:682
unsigned char * m_field_metadata
Definition: rows_event.h:689
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:105
std::string get_db_name()
Definition: rows_event.h:705
size_t m_data_size
Definition: rows_event.h:675
std::string m_dbnam
event data size
Definition: rows_event.h:678
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
Table_map_event_offset
Constants representing offsets.
Definition: rows_event.h:527
@ TM_FLAGS_OFFSET
Definition: rows_event.h:530
@ TM_MAPID_OFFSET
TM = "Table Map".
Definition: rows_event.h:529
flag_set m_flags
Definition: rows_event.h:673
unsigned int m_optional_metadata_len
Definition: rows_event.h:691
Table_id m_table_id
Event post header contents.
Definition: rows_event.h:672
unsigned char * m_optional_metadata
Definition: rows_event.h:692
Log row updates with a before image.
Definition: rows_event.h:1115
Update_rows_event(const char *buf, const Format_description_event *fde)
Definition: rows_event.cpp:562
Update_rows_event(Log_event_type event_type)
Definition: rows_event.h:1118
Log row insertions.
Definition: rows_event.h:1097
Write_rows_event()
Definition: rows_event.h:1100
Contains the classes representing events operating in the replication stream properties.
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:39
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1065
Definition: buf0block_hint.cc:29
The namespace contains classes representing events that can occur in a replication stream.
Definition: binlog_event.cpp:35
Log_event_type
Enumeration type for the different types of log events.
Definition: binlog_event.h:285
@ ROWS_QUERY_LOG_EVENT
Definition: binlog_event.h:343
@ WRITE_ROWS_EVENT
Version 2 of the Row events.
Definition: binlog_event.h:346
@ DELETE_ROWS_EVENT
Definition: binlog_event.h:348
@ TABLE_MAP_EVENT
Definition: binlog_event.h:316
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
Contains the class Table_id, mainly used for row based replication.
#define BAPI_ASSERT(x)
Definition: wrapper_functions.h:60