32#ifndef MYSQL_BINLOG_EVENT_ROWS_EVENT_H
33#define MYSQL_BINLOG_EVENT_ROWS_EVENT_H
48#define EXTRA_ROW_INFO_LEN_OFFSET 0
49#define EXTRA_ROW_INFO_FORMAT_OFFSET 1
50#define EXTRA_ROW_INFO_HEADER_LENGTH 2
51#define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HEADER_LENGTH)
53#define ROWS_MAPID_OFFSET 0
54#define ROWS_FLAGS_OFFSET 6
55#define ROWS_VHLEN_OFFSET 8
56#define EXTRA_ROW_INFO_TYPECODE_LENGTH 1
57#define EXTRA_ROW_PART_INFO_VALUE_LENGTH 2
579 typedef std::pair<unsigned int, unsigned int>
uint_pair;
623 unsigned int optional_metadata_len);
652 size_t dblen,
const char *tblnam,
size_t tbllen)
709 void print_event_info(std::ostream &info)
override;
710 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:251
This is the abstract base class for binary log events.
Definition: binlog_event.h:859
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:674
Common base class for all row-containing binary log events.
Definition: rows_event.h:880
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:889
@ STMT_END_F
Last event of a statement.
Definition: rows_event.h:891
@ NO_FOREIGN_KEY_CHECKS_F
Value of the OPTION_NO_FOREIGN_KEY_CHECKS flag in thd->options.
Definition: rows_event.h:893
@ RELAXED_UNIQUE_CHECKS_F
Value of the OPTION_RELAXED_UNIQUE_CHECKS flag in thd->options.
Definition: rows_event.h:895
@ ALL_FLAGS
Flags for everything.
Definition: rows_event.h:904
@ 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:900
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:42
unsigned long long id() const
Definition: table_id.h:52
In row-based mode, every row operation event is preceded by a Table_map_event which maps a table defi...
Definition: rows_event.h:525
unsigned char * m_coltype
Definition: rows_event.h:684
Table_map_event()
Definition: rows_event.h:695
std::string m_tblnam
Definition: rows_event.h:681
std::string get_table_name()
Definition: rows_event.h:705
uint16_t flag_set
Definition: rows_event.h:534
unsigned char * m_null_bits
field metadata
Definition: rows_event.h:691
unsigned long long get_table_id()
Definition: rows_event.h:704
unsigned long long int m_dblen
Definition: rows_event.h:680
unsigned long long int m_tbllen
Definition: rows_event.h:682
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:548
@ PRIMARY_KEY_WITH_PREFIX
Definition: rows_event.h:561
@ COLUMN_CHARSET
Definition: rows_event.h:553
@ SET_STR_VALUE
Definition: rows_event.h:557
@ COLUMN_VISIBILITY
Definition: rows_event.h:570
@ ENUM_AND_SET_DEFAULT_CHARSET
Definition: rows_event.h:562
@ SIMPLE_PRIMARY_KEY
Definition: rows_event.h:560
@ ENUM_AND_SET_COLUMN_CHARSET
Definition: rows_event.h:566
@ ENUM_STR_VALUE
Definition: rows_event.h:558
@ SIGNEDNESS
Definition: rows_event.h:549
@ DEFAULT_CHARSET
Definition: rows_event.h:550
@ GEOMETRY_TYPE
Definition: rows_event.h:559
@ COLUMN_NAME
Definition: rows_event.h:556
unsigned long m_colcnt
Definition: rows_event.h:683
unsigned char * m_field_metadata
Definition: rows_event.h:690
unsigned long m_field_metadata_size
The size of field metadata buffer set by calling save_field_metadata()
Definition: rows_event.h:689
~Table_map_event() override
Definition: rows_event.cpp:106
std::string get_db_name()
Definition: rows_event.h:706
size_t m_data_size
Definition: rows_event.h:676
std::string m_dbnam
event data size
Definition: rows_event.h:679
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:651
Table_map_event_offset
Constants representing offsets.
Definition: rows_event.h:528
@ TM_FLAGS_OFFSET
Definition: rows_event.h:531
@ TM_MAPID_OFFSET
TM = "Table Map".
Definition: rows_event.h:530
flag_set m_flags
Definition: rows_event.h:674
unsigned int m_optional_metadata_len
Definition: rows_event.h:692
Table_id m_table_id
Event post header contents.
Definition: rows_event.h:673
unsigned char * m_optional_metadata
Definition: rows_event.h:693
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:64
static int flag
Definition: hp_test1.cc:40
void copy(Shards< COUNT > &dst, const Shards< COUNT > &src) noexcept
Copy the counters, overwrite destination.
Definition: ut0counter.h:354
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
Definition: buf0block_hint.cc:30
The namespace contains classes representing events that can occur in a replication stream.
Definition: binlog_event.cpp:36
Log_event_type
Enumeration type for the different types of log events.
Definition: binlog_event.h:286
@ ROWS_QUERY_LOG_EVENT
Definition: binlog_event.h:345
@ WRITE_ROWS_EVENT
Version 2 of the Row events.
Definition: binlog_event.h:348
@ DELETE_ROWS_EVENT
Definition: binlog_event.h:350
@ TABLE_MAP_EVENT
Definition: binlog_event.h:317
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:193
Contains the class Table_id, mainly used for row based replication.
#define BAPI_ASSERT(x)
Definition: wrapper_functions.h:61