summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-04-07 10:19:10 +0300
committerAlexander Barkov <bar@mariadb.org>2017-04-07 15:58:17 +0400
commit546e7aa96f13091dc32f87809e7b6ea19d20e1ad (patch)
tree822451f20dc33fffefbfabd3dd10c441e657e019 /sql/log.h
parented305c0fd52d17110e9cc7c2e515d1f881de1102 (diff)
downloadmariadb-git-546e7aa96f13091dc32f87809e7b6ea19d20e1ad.tar.gz
MDEV-8203 Assert in Query_log_event::do_apply_event()
This happens because the master writes a table_map event to the binary log, but no row event. The slave has a check that there should always be a row event if there was a table_map event, which causes a crash. Fixed by remembering in the cache what kind of events are logged and ignore cached statements which is just a table map event.
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/log.h b/sql/log.h
index f1a025edfb9..ae8f8170a98 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -415,8 +415,10 @@ private:
( ((ulong)(c)>>1) == BINLOG_COOKIE_DUMMY_ID )
class binlog_cache_mngr;
+class binlog_cache_data;
struct rpl_gtid;
struct wait_for_commit;
+
class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
{
private:
@@ -743,8 +745,8 @@ public:
void stop_union_events(THD *thd);
bool is_query_in_union(THD *thd, query_id_t query_id_param);
- bool write_event(Log_event *ev, IO_CACHE *file);
- bool write_event(Log_event *ev) { return write_event(ev, &log_file); }
+ bool write_event(Log_event *ev, binlog_cache_data *data, IO_CACHE *file);
+ bool write_event(Log_event *ev) { return write_event(ev, 0, &log_file); }
bool write_event_buffer(uchar* buf,uint len);
bool append(Log_event* ev);