Commit bbae2d39 authored by Andrei Elkin's avatar Andrei Elkin

MDEV-26712 row events never reset thd->mem_root

but must do that at the end of the statement.
A provide template patch is elaborated also to match
to the upstream fixes of the very same bug.
parent ef0dc50c
...@@ -11208,12 +11208,17 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) ...@@ -11208,12 +11208,17 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
} }
#endif /* WITH_WSREP && HAVE_QUERY_CACHE */ #endif /* WITH_WSREP && HAVE_QUERY_CACHE */
if (get_flags(STMT_END_F) && (error= rows_event_stmt_cleanup(rgi, thd))) if (get_flags(STMT_END_F))
slave_rows_error_report(ERROR_LEVEL, {
thd->is_error() ? 0 : error, if ((error= rows_event_stmt_cleanup(rgi, thd)))
rgi, thd, table, slave_rows_error_report(ERROR_LEVEL,
get_type_str(), thd->is_error() ? 0 : error,
RPL_LOG_NAME, (ulong) log_pos); rgi, thd, table,
get_type_str(),
RPL_LOG_NAME, (ulong) log_pos);
if (thd->slave_thread)
free_root(thd->mem_root, MYF(MY_KEEP_PREALLOC));
}
DBUG_RETURN(error); DBUG_RETURN(error);
err: err:
......
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