mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
BUG#27779 (Slave cannot read old rows log events):
Taking code from before BUG#22583 and incorporating as events to be able
to read old events. Also incorporating old pack and unpack functions
into patch.
client/Makefile.am:
Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
client/mysqlbinlog.cc:
Adding log_event_old.cc.
libmysqld/Makefile.am:
Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/CMakeLists.txt:
Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/Makefile.am:
Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/log_event.cc:
Adding code to read pre-GA rows events.
sql/log_event.h:
Refactoring to support inheritance and including "old" events definitions.
sql/log_event_old.cc:
New BitKeeper file ``sql/log_event_old.cc''
sql/log_event_old.h:
New BitKeeper file ``sql/log_event_old.h''
sql/rpl_record_old.cc:
New BitKeeper file ``sql/rpl_record_old.cc''
sql/rpl_record_old.h:
New BitKeeper file ``sql/rpl_record_old.h''
This commit is contained in:
parent
ec9b5eca9c
commit
5c35b4174e
11 changed files with 403 additions and 4 deletions
91
sql/log_event_old.h
Normal file
91
sql/log_event_old.h
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
#ifndef LOG_EVENT_OLD_H
|
||||
#define LOG_EVENT_OLD_H
|
||||
|
||||
/*
|
||||
Need to include this file at the proper position of log_event.h
|
||||
*/
|
||||
|
||||
|
||||
class Write_rows_log_event_old : public Write_rows_log_event
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
/* Support interface to THD::binlog_prepare_pending_rows_event */
|
||||
TYPE_CODE = PRE_GA_WRITE_ROWS_EVENT
|
||||
};
|
||||
|
||||
#if defined(HAVE_REPLICATION)
|
||||
Write_rows_log_event_old(const char *buf, uint event_len,
|
||||
const Format_description_log_event *descr)
|
||||
: Write_rows_log_event(buf, event_len, descr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
class Update_rows_log_event_old : public Update_rows_log_event
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
/* Support interface to THD::binlog_prepare_pending_rows_event */
|
||||
TYPE_CODE = PRE_GA_UPDATE_ROWS_EVENT
|
||||
};
|
||||
|
||||
#if defined(HAVE_REPLICATION)
|
||||
Update_rows_log_event_old(const char *buf, uint event_len,
|
||||
const Format_description_log_event *descr)
|
||||
: Update_rows_log_event(buf, event_len, descr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
};
|
||||
|
||||
|
||||
class Delete_rows_log_event_old : public Delete_rows_log_event
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
/* Support interface to THD::binlog_prepare_pending_rows_event */
|
||||
TYPE_CODE = PRE_GA_DELETE_ROWS_EVENT
|
||||
};
|
||||
|
||||
#if defined(HAVE_REPLICATION)
|
||||
Delete_rows_log_event_old(const char *buf, uint event_len,
|
||||
const Format_description_log_event *descr)
|
||||
: Delete_rows_log_event(buf, event_len, descr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue