summaryrefslogtreecommitdiff
path: root/sql/log_event_old.h
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2007-04-12 15:50:54 +0200
committerunknown <mats@romeo.(none)>2007-04-12 15:50:54 +0200
commit5c35b4174ef8a3505f927444ec9001848b3073be (patch)
tree99bc39551e216b0f815a7d3af2d4237c7ed72cc9 /sql/log_event_old.h
parentec9b5eca9cee569eb4c1442cb0ab47c72dac818d (diff)
downloadmariadb-git-5c35b4174ef8a3505f927444ec9001848b3073be.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. 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''
Diffstat (limited to 'sql/log_event_old.h')
-rw-r--r--sql/log_event_old.h91
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
+