Incorrect free of rgi->deferred_events in parallel replication

Description

Problem reported by nanyi607rao on maria-developers@:

...
else
{
if(!(rgi= new rpl_group_info(rli)))
{
my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*rgi));
return NULL;
}
rgi->is_parallel_exec = true;

  • if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on()))
    _ rgi->deferred_events= new Deferred_log_events(rli);
    }
    + if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on()))
    + rgi->deferred_events= new Deferred_log_events(rli);

because rgi->deferred_events was freed in rpl_parallel_thread::free_rgi() if it wasn't NULL

Environment

None

Status

Assignee

Kristian Nielsen

Reporter

Kristian Nielsen

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

10.0.8

Priority

Major