mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
References: MDEV-4211 - appended format description event for TOI replication write set, FD carries binlog checksum algorithm
This commit is contained in:
@ -8073,7 +8073,7 @@ static inline wsrep_status_t wsrep_apply_rbr(
|
|||||||
char *buf= (char *)rbr_buf;
|
char *buf= (char *)rbr_buf;
|
||||||
int rcode= 0;
|
int rcode= 0;
|
||||||
int event= 1;
|
int event= 1;
|
||||||
|
Format_description_log_event *description_event = wsrep_format_desc;
|
||||||
DBUG_ENTER("wsrep_apply_rbr");
|
DBUG_ENTER("wsrep_apply_rbr");
|
||||||
|
|
||||||
if (thd->killed == KILL_CONNECTION)
|
if (thd->killed == KILL_CONNECTION)
|
||||||
@ -8100,7 +8100,7 @@ static inline wsrep_status_t wsrep_apply_rbr(
|
|||||||
{
|
{
|
||||||
int exec_res;
|
int exec_res;
|
||||||
int error = 0;
|
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)
|
if (!ev)
|
||||||
{
|
{
|
||||||
@ -8116,6 +8116,9 @@ static inline wsrep_status_t wsrep_apply_rbr(
|
|||||||
DBUG_ASSERT(buf_len != 0 ||
|
DBUG_ASSERT(buf_len != 0 ||
|
||||||
((Rows_log_event *) ev)->get_flags(Rows_log_event::STMT_END_F));
|
((Rows_log_event *) ev)->get_flags(Rows_log_event::STMT_END_F));
|
||||||
break;
|
break;
|
||||||
|
case FORMAT_DESCRIPTION_EVENT:
|
||||||
|
description_event = (Format_description_log_event *)ev;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
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",
|
WSREP_ERROR("Error in %s event: commit of row events failed: %lld",
|
||||||
ev->get_type_str(), (long long)thd->wsrep_trx_seqno);
|
ev->get_type_str(), (long long)thd->wsrep_trx_seqno);
|
||||||
}
|
}
|
||||||
delete ev;
|
|
||||||
|
if (description_event != ev)
|
||||||
|
delete ev;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -976,6 +976,8 @@ int wsrep_to_buf_helper(
|
|||||||
return 1;
|
return 1;
|
||||||
Query_log_event ev(thd, query, query_len, FALSE, FALSE, FALSE, 0);
|
Query_log_event ev(thd, query, query_len, FALSE, FALSE, FALSE, 0);
|
||||||
int ret(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 (ev.write(&tmp_io_cache)) ret= 1;
|
||||||
if (!ret && wsrep_write_cache(&tmp_io_cache, buf, buf_len)) ret= 1;
|
if (!ret && wsrep_write_cache(&tmp_io_cache, buf, buf_len)) ret= 1;
|
||||||
close_cached_file(&tmp_io_cache);
|
close_cached_file(&tmp_io_cache);
|
||||||
|
Reference in New Issue
Block a user