From dc9e32540744a0e44e6e80c36a82ea6ee1ef2657 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 20 Apr 2015 13:18:21 +0300 Subject: [PATCH] refs codership/mysql-wsrep#110 - clear table map events on SAVEPOINT Clear binlog table maps before writing SAVEPOINT query event into binlog cache. This enforces recreation of table map events for the following row event. --- sql/log.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/log.cc b/sql/log.cc index d9f63157f4b..4868902b524 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2282,6 +2282,11 @@ static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) char buf[1024]; #ifdef WITH_WSREP if (wsrep_emulate_bin_log) DBUG_RETURN(0); + /* + Clear table maps before writing SAVEPOINT event. This enforces + recreation of table map events for the following row event. + */ + thd->clear_binlog_table_maps(); #endif /* WITH_WSREP */ String log_query(buf, sizeof(buf), &my_charset_bin); if (log_query.copy(STRING_WITH_LEN("SAVEPOINT "), &my_charset_bin) ||