summaryrefslogtreecommitdiffstats
path: root/sql/log_event.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sql/log_event.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 67e06d70..f6101eb7 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -57,6 +57,8 @@
#include "rpl_gtid.h"
+#include "log_event_data_type.h"
+
/* Forward declarations */
#ifndef MYSQL_CLIENT
class String;
@@ -156,6 +158,12 @@ class String;
#define NUM_LOAD_DELIM_STRS 5
+/*
+ The following is the max table_map_id. This is limited by that we
+ are using 6 bytes for it in replication
+*/
+#define MAX_TABLE_MAP_ID ((1ULL << (6*8)) -1)
+
/*****************************************************************************
MySQL Binary Log
@@ -1379,7 +1387,8 @@ public:
static Log_event* read_log_event(IO_CACHE* file,
const Format_description_log_event
*description_event,
- my_bool crc_check);
+ my_bool crc_check,
+ my_bool print_errors= 1);
/**
Reads an event from a binlog or relay log. Used by the dump thread
@@ -1523,7 +1532,8 @@ public:
static Log_event* read_log_event(const uchar *buf, uint event_len,
const char **error,
const Format_description_log_event
- *description_event, my_bool crc_check);
+ *description_event, my_bool crc_check,
+ my_bool print_errors= 1);
/**
Returns the human readable name of the given event type.
*/
@@ -3338,33 +3348,27 @@ private:
@section User_var_log_event_binary_format Binary Format
*/
-class User_var_log_event: public Log_event
+
+class User_var_log_event: public Log_event, public Log_event_data_type
{
public:
- enum {
- UNDEF_F= 0,
- UNSIGNED_F= 1
- };
const char *name;
size_t name_len;
const char *val;
size_t val_len;
- Item_result type;
- uint charset_number;
bool is_null;
- uchar flags;
#ifdef MYSQL_SERVER
bool deferred;
query_id_t query_id;
User_var_log_event(THD* thd_arg, const char *name_arg, size_t name_len_arg,
const char *val_arg, size_t val_len_arg,
- Item_result type_arg,
- uint charset_number_arg, uchar flags_arg,
+ const Log_event_data_type &data_type,
bool using_trans, bool direct)
:Log_event(thd_arg, 0, using_trans),
+ Log_event_data_type(data_type),
name(name_arg), name_len(name_len_arg), val(val_arg),
- val_len(val_len_arg), type(type_arg), charset_number(charset_number_arg),
- flags(flags_arg), deferred(false)
+ val_len(val_len_arg),
+ deferred(false)
{
is_null= !val;
if (direct)
@@ -4865,7 +4869,8 @@ public:
flag_set get_flags(flag_set flag) const { return m_flags & flag; }
#ifdef MYSQL_SERVER
- Table_map_log_event(THD *thd, TABLE *tbl, ulong tid, bool is_transactional);
+ Table_map_log_event(THD *thd, TABLE *tbl, ulonglong tid,
+ bool is_transactional);
#endif
#ifdef HAVE_REPLICATION
Table_map_log_event(const uchar *buf, uint event_len,
@@ -5191,7 +5196,7 @@ protected:
this class, not create instances of this class.
*/
#ifdef MYSQL_SERVER
- Rows_log_event(THD*, TABLE*, ulong table_id,
+ Rows_log_event(THD*, TABLE*, ulonglong table_id,
MY_BITMAP const *cols, bool is_transactional,
Log_event_type event_type);
#endif
@@ -5425,7 +5430,7 @@ public:
};
#if defined(MYSQL_SERVER)
- Write_rows_log_event(THD*, TABLE*, ulong table_id,
+ Write_rows_log_event(THD*, TABLE*, ulonglong table_id,
bool is_transactional);
#endif
#ifdef HAVE_REPLICATION
@@ -5466,7 +5471,7 @@ class Write_rows_compressed_log_event : public Write_rows_log_event
{
public:
#if defined(MYSQL_SERVER)
- Write_rows_compressed_log_event(THD*, TABLE*, ulong table_id,
+ Write_rows_compressed_log_event(THD*, TABLE*, ulonglong table_id,
bool is_transactional);
virtual bool write();
#endif
@@ -5502,7 +5507,7 @@ public:
};
#ifdef MYSQL_SERVER
- Update_rows_log_event(THD*, TABLE*, ulong table_id,
+ Update_rows_log_event(THD*, TABLE*, ulonglong table_id,
bool is_transactional);
void init(MY_BITMAP const *cols);
@@ -5554,7 +5559,7 @@ class Update_rows_compressed_log_event : public Update_rows_log_event
{
public:
#if defined(MYSQL_SERVER)
- Update_rows_compressed_log_event(THD*, TABLE*, ulong table_id,
+ Update_rows_compressed_log_event(THD*, TABLE*, ulonglong table_id,
bool is_transactional);
virtual bool write();
#endif
@@ -5598,7 +5603,7 @@ public:
};
#ifdef MYSQL_SERVER
- Delete_rows_log_event(THD*, TABLE*, ulong, bool is_transactional);
+ Delete_rows_log_event(THD*, TABLE*, ulonglong, bool is_transactional);
#endif
#ifdef HAVE_REPLICATION
Delete_rows_log_event(const uchar *buf, uint event_len,
@@ -5639,7 +5644,8 @@ class Delete_rows_compressed_log_event : public Delete_rows_log_event
{
public:
#if defined(MYSQL_SERVER)
- Delete_rows_compressed_log_event(THD*, TABLE*, ulong, bool is_transactional);
+ Delete_rows_compressed_log_event(THD*, TABLE*, ulonglong,
+ bool is_transactional);
virtual bool write();
#endif
#ifdef HAVE_REPLICATION