|
|
|
@ -521,7 +521,7 @@ public:
|
|
|
|
|
virtual int write_data_body(IO_CACHE* file __attribute__((unused)))
|
|
|
|
|
{ return 0; }
|
|
|
|
|
virtual Log_event_type get_type_code() = 0;
|
|
|
|
|
virtual const bool is_valid() = 0;
|
|
|
|
|
virtual bool is_valid() const = 0;
|
|
|
|
|
inline bool get_cache_stmt() { return cache_stmt; }
|
|
|
|
|
Log_event(const char* buf, const Format_description_log_event* description_event);
|
|
|
|
|
virtual ~Log_event() { free_temp_buf();}
|
|
|
|
@ -669,7 +669,7 @@ public:
|
|
|
|
|
Log_event_type get_type_code() { return QUERY_EVENT; }
|
|
|
|
|
int write(IO_CACHE* file);
|
|
|
|
|
int write_data(IO_CACHE* file); // returns 0 on success, -1 on error
|
|
|
|
|
const bool is_valid() { return query != 0; }
|
|
|
|
|
bool is_valid() const { return query != 0; }
|
|
|
|
|
int get_data_size()
|
|
|
|
|
{
|
|
|
|
|
/* Note that the "1" below is the db's length. */
|
|
|
|
@ -711,7 +711,7 @@ public:
|
|
|
|
|
Slave_log_event(const char* buf, uint event_len);
|
|
|
|
|
~Slave_log_event();
|
|
|
|
|
int get_data_size();
|
|
|
|
|
const bool is_valid() { return master_host != 0; }
|
|
|
|
|
bool is_valid() const { return master_host != 0; }
|
|
|
|
|
Log_event_type get_type_code() { return SLAVE_EVENT; }
|
|
|
|
|
int write_data(IO_CACHE* file );
|
|
|
|
|
};
|
|
|
|
@ -806,7 +806,7 @@ public:
|
|
|
|
|
}
|
|
|
|
|
int write_data_header(IO_CACHE* file);
|
|
|
|
|
int write_data_body(IO_CACHE* file);
|
|
|
|
|
const bool is_valid() { return table_name != 0; }
|
|
|
|
|
bool is_valid() const { return table_name != 0; }
|
|
|
|
|
int get_data_size()
|
|
|
|
|
{
|
|
|
|
|
return (table_name_len + db_len + 2 + fname_len
|
|
|
|
@ -873,7 +873,7 @@ public:
|
|
|
|
|
~Start_log_event_v3() {}
|
|
|
|
|
Log_event_type get_type_code() { return START_EVENT_V3;}
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
int get_data_size()
|
|
|
|
|
{
|
|
|
|
|
return START_V3_HEADER_LEN; //no variable-sized part
|
|
|
|
@ -913,7 +913,7 @@ public:
|
|
|
|
|
~Format_description_log_event() { my_free((gptr)post_header_len, MYF(0)); }
|
|
|
|
|
Log_event_type get_type_code() { return FORMAT_DESCRIPTION_EVENT;}
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const bool is_valid()
|
|
|
|
|
bool is_valid() const
|
|
|
|
|
{
|
|
|
|
|
return ((common_header_len >= ((binlog_version==1) ? OLD_HEADER_LEN :
|
|
|
|
|
LOG_EVENT_MINIMAL_HEADER_LEN)) &&
|
|
|
|
@ -968,7 +968,7 @@ public:
|
|
|
|
|
const char* get_var_type_name();
|
|
|
|
|
int get_data_size() { return 9; /* sizeof(type) + sizeof(val) */;}
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
@ -1004,7 +1004,7 @@ class Rand_log_event: public Log_event
|
|
|
|
|
Log_event_type get_type_code() { return RAND_EVENT;}
|
|
|
|
|
int get_data_size() { return 16; /* sizeof(ulonglong) * 2*/ }
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
@ -1051,7 +1051,7 @@ public:
|
|
|
|
|
UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE + val_len);
|
|
|
|
|
}
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
@ -1077,7 +1077,7 @@ public:
|
|
|
|
|
{}
|
|
|
|
|
~Stop_log_event() {}
|
|
|
|
|
Log_event_type get_type_code() { return STOP_EVENT;}
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* HAVE_REPLICATION */
|
|
|
|
@ -1126,7 +1126,7 @@ public:
|
|
|
|
|
return (LOG_EVENT_MINIMAL_HEADER_LEN + get_data_size());
|
|
|
|
|
}
|
|
|
|
|
int get_data_size() { return ident_len + ROTATE_HEADER_LEN;}
|
|
|
|
|
const bool is_valid() { return new_log_ident != 0; }
|
|
|
|
|
bool is_valid() const { return new_log_ident != 0; }
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -1186,7 +1186,7 @@ public:
|
|
|
|
|
Load_log_event::get_data_size() +
|
|
|
|
|
4 + 1 + block_len);
|
|
|
|
|
}
|
|
|
|
|
const bool is_valid() { return inited_from_old || block != 0; }
|
|
|
|
|
bool is_valid() const { return inited_from_old || block != 0; }
|
|
|
|
|
int write_data_header(IO_CACHE* file);
|
|
|
|
|
int write_data_body(IO_CACHE* file);
|
|
|
|
|
/*
|
|
|
|
@ -1236,7 +1236,7 @@ public:
|
|
|
|
|
~Append_block_log_event() {}
|
|
|
|
|
Log_event_type get_type_code() { return APPEND_BLOCK_EVENT;}
|
|
|
|
|
int get_data_size() { return block_len + APPEND_BLOCK_HEADER_LEN ;}
|
|
|
|
|
const bool is_valid() { return block != 0; }
|
|
|
|
|
bool is_valid() const { return block != 0; }
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const char* get_db() { return db; }
|
|
|
|
|
};
|
|
|
|
@ -1268,7 +1268,7 @@ public:
|
|
|
|
|
~Delete_file_log_event() {}
|
|
|
|
|
Log_event_type get_type_code() { return DELETE_FILE_EVENT;}
|
|
|
|
|
int get_data_size() { return DELETE_FILE_HEADER_LEN ;}
|
|
|
|
|
const bool is_valid() { return file_id != 0; }
|
|
|
|
|
bool is_valid() const { return file_id != 0; }
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const char* get_db() { return db; }
|
|
|
|
|
};
|
|
|
|
@ -1299,7 +1299,7 @@ public:
|
|
|
|
|
~Execute_load_log_event() {}
|
|
|
|
|
Log_event_type get_type_code() { return EXEC_LOAD_EVENT;}
|
|
|
|
|
int get_data_size() { return EXEC_LOAD_HEADER_LEN ;}
|
|
|
|
|
const bool is_valid() { return file_id != 0; }
|
|
|
|
|
bool is_valid() const { return file_id != 0; }
|
|
|
|
|
int write_data(IO_CACHE* file);
|
|
|
|
|
const char* get_db() { return db; }
|
|
|
|
|
};
|
|
|
|
@ -1319,7 +1319,7 @@ public:
|
|
|
|
|
~Unknown_log_event() {}
|
|
|
|
|
void print(FILE* file, bool short_form= 0, LAST_EVENT_INFO* last_event_info= 0);
|
|
|
|
|
Log_event_type get_type_code() { return UNKNOWN_EVENT;}
|
|
|
|
|
const bool is_valid() { return 1; }
|
|
|
|
|
bool is_valid() const { return 1; }
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|