diff options
author | mats@romeo.(none) <> | 2007-04-12 15:50:54 +0200 |
---|---|---|
committer | mats@romeo.(none) <> | 2007-04-12 15:50:54 +0200 |
commit | 06faf8f411565ec41b6aa777bf35ae5e8417a30e (patch) | |
tree | 99bc39551e216b0f815a7d3af2d4237c7ed72cc9 /sql/log_event_old.h | |
parent | c4b15b2e68bb8246711b9db29d65681fbc665ad7 (diff) | |
download | mariadb-git-06faf8f411565ec41b6aa777bf35ae5e8417a30e.tar.gz |
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.
Diffstat (limited to 'sql/log_event_old.h')
-rw-r--r-- | sql/log_event_old.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/sql/log_event_old.h b/sql/log_event_old.h new file mode 100644 index 00000000000..aad0f6cc6cd --- /dev/null +++ b/sql/log_event_old.h @@ -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 + |