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
580 typedef std::pair<unsigned int, unsigned int>
uint_pair;
625 unsigned int optional_metadata_len);
654 size_t dblen,
const char *tblnam,
size_t tbllen)
711 void print_event_info(std::ostream &info)
override;
712 void print_long_info(std::ostream &info)
override;
1004 static_cast<unsigned char *
>(
bapi_malloc(len, 16 ));
1019 int part_id_arg,
int source_part_id);
1051 std::stringstream ss;
1059 auto unknown_flags =
m_flags & ~ALL_FLAGS;
1060 ss <<
" UNKNOWN_FLAG(" << std::hex <<
"0x" << unknown_flags <<
")";
1074 std::string
str =
"";
1083 void print_event_info(std::ostream &info)
override;
1084 void print_long_info(std::ostream &info)
override;
1087 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:851
Log row deletions.
Definition: rows_event.h:1136
Delete_rows_event()
Definition: rows_event.h:1139
Base class for ignorable log events.
Definition: control_events.h:675
Common base class for all row-containing binary log events.
Definition: rows_event.h:882
unsigned long m_width
Flags for row-level events.
Definition: rows_event.h:958
enum_flag
These definitions allow to combine the flags into an appropriate flag set using the normal bitwise op...
Definition: rows_event.h:891
@ STMT_END_F
Last event of a statement.
Definition: rows_event.h:893
@ NO_FOREIGN_KEY_CHECKS_F
Value of the OPTION_NO_FOREIGN_KEY_CHECKS flag in thd->options.
Definition: rows_event.h:895
@ RELAXED_UNIQUE_CHECKS_F
Value of the OPTION_RELAXED_UNIQUE_CHECKS flag in thd->options.
Definition: rows_event.h:897
@ ALL_FLAGS
Flags for everything.
Definition: rows_event.h:906
@ 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:902
unsigned long long get_table_id() const
Definition: rows_event.h:1032
std::string get_enum_flag_string() const
Gets the flags listed as strings.
Definition: rows_event.h:1047
Rows_event(Log_event_type type_arg)
Constructs an event directly.
Definition: rows_event.h:918
uint16_t var_header_len
value determined by (m_width + 7) / 8
Definition: rows_event.h:960
uint32_t n_bits_len
The width of the columns bitmap.
Definition: rows_event.h:959
unsigned long get_width() const
Definition: rows_event.h:1038
Table_id m_table_id
Actual event type.
Definition: rows_event.h:954
std::vector< uint8_t > row
Definition: rows_event.h:964
Extra_row_info m_extra_row_info
Definition: rows_event.h:1030
uint32_t get_null_bits_len() const
Definition: rows_event.h:1036
friend class Row_event_iterator
Definition: rows_event.h:1088
enum_flag get_flags() const
Definition: rows_event.h:1034
static std::string get_flag_string(enum_flag flag)
Gets a string describing the flags.
Definition: rows_event.h:1071
Log_event_type m_type
Definition: rows_event.h:951
std::vector< uint8_t > columns_after_image
Definition: rows_event.h:963
uint16_t m_flags
Definition: rows_event.h:955
std::vector< uint8_t > columns_before_image
Definition: rows_event.h:962
Rows query event type, which is a subclass of the Ignorable_event, to record the original query for t...
Definition: rows_event.h:1177
char * m_rows_query
Definition: rows_event.h:1207
~Rows_query_event() override
Definition: rows_event.cpp:571
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:1199
size_t m_rows_query_length
Definition: rows_event.h:1208
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:686
Table_map_event()
Definition: rows_event.h:697
std::string m_tblnam
Definition: rows_event.h:683
std::string get_table_name()
Definition: rows_event.h:707
uint16_t flag_set
Definition: rows_event.h:534
unsigned char * m_null_bits
field metadata
Definition: rows_event.h:693
unsigned long long get_table_id()
Definition: rows_event.h:706
unsigned long long int m_dblen
Definition: rows_event.h:682
unsigned long long int m_tbllen
Definition: rows_event.h:684
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
@ VECTOR_DIMENSIONALITY
Definition: rows_event.h:572
@ 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:685
unsigned char * m_field_metadata
Definition: rows_event.h:692
unsigned long m_field_metadata_size
The size of field metadata buffer set by calling save_field_metadata()
Definition: rows_event.h:691
~Table_map_event() override
Definition: rows_event.cpp:106
std::string get_db_name()
Definition: rows_event.h:708
size_t m_data_size
Definition: rows_event.h:678
std::string m_dbnam
event data size
Definition: rows_event.h:681
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:653
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:676
unsigned int m_optional_metadata_len
Definition: rows_event.h:694
Table_id m_table_id
Event post header contents.
Definition: rows_event.h:675
unsigned char * m_optional_metadata
Definition: rows_event.h:695
Log row updates with a before image.
Definition: rows_event.h:1117
Update_rows_event(const char *buf, const Format_description_event *fde)
Definition: rows_event.cpp:584
Update_rows_event(Log_event_type event_type)
Definition: rows_event.h:1120
Log row insertions.
Definition: rows_event.h:1099
Write_rows_event()
Definition: rows_event.h:1102
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:1105
Definition: buf0block_hint.cc:30
The namespace contains classes representing events that can occur in a replication stream.
Definition: binlog_event.cpp:38
Log_event_type
Enumeration type for the different types of log events.
Definition: binlog_event.h:278
@ ROWS_QUERY_LOG_EVENT
Definition: binlog_event.h:337
@ WRITE_ROWS_EVENT
Version 2 of the Row events.
Definition: binlog_event.h:340
@ DELETE_ROWS_EVENT
Definition: binlog_event.h:342
@ TABLE_MAP_EVENT
Definition: binlog_event.h:309
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