Commit 4174f1a4 authored by Seppo Jaakola's avatar Seppo Jaakola

References: MDEV-4211 - appended format description event for TOI replication...

References: MDEV-4211 - appended format description event for TOI replication write set, FD carries binlog checksum algorithm
parent 7ba8b2ae
......@@ -8073,7 +8073,7 @@ static inline wsrep_status_t wsrep_apply_rbr(
char *buf= (char *)rbr_buf;
int rcode= 0;
int event= 1;
Format_description_log_event *description_event = wsrep_format_desc;
DBUG_ENTER("wsrep_apply_rbr");
if (thd->killed == KILL_CONNECTION)
......@@ -8100,7 +8100,7 @@ static inline wsrep_status_t wsrep_apply_rbr(
{
int exec_res;
int error = 0;
Log_event* ev= wsrep_read_log_event(&buf, &buf_len, wsrep_format_desc);
Log_event* ev= wsrep_read_log_event(&buf, &buf_len, description_event);
if (!ev)
{
......@@ -8116,6 +8116,9 @@ static inline wsrep_status_t wsrep_apply_rbr(
DBUG_ASSERT(buf_len != 0 ||
((Rows_log_event *) ev)->get_flags(Rows_log_event::STMT_END_F));
break;
case FORMAT_DESCRIPTION_EVENT:
description_event = (Format_description_log_event *)ev;
break;
default:
break;
}
......@@ -8174,7 +8177,9 @@ static inline wsrep_status_t wsrep_apply_rbr(
WSREP_ERROR("Error in %s event: commit of row events failed: %lld",
ev->get_type_str(), (long long)thd->wsrep_trx_seqno);
}
delete ev;
if (description_event != ev)
delete ev;
}
error:
......
......@@ -976,6 +976,8 @@ int wsrep_to_buf_helper(
return 1;
Query_log_event ev(thd, query, query_len, FALSE, FALSE, FALSE, 0);
int ret(0);
wsrep_format_desc->checksum_alg = binlog_checksum_options;
wsrep_format_desc->write(&tmp_io_cache);
if (ev.write(&tmp_io_cache)) ret= 1;
if (!ret && wsrep_write_cache(&tmp_io_cache, buf, buf_len)) ret= 1;
close_cached_file(&tmp_io_cache);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment