Ensure that slave->cstate contains meaningful value.
In blr_slave_callback the bits of slave->cstate are reset and set as one transaction. Earlier they were reset in one and set in another, leading to a situation where slave->cstate did not contain a sensible value for a short period of time. Further, it is now explicitly checked in blr_distribute_binlog_record that slave->cstate indeed contains a meaningful value.
This commit is contained in:
@ -1602,6 +1602,11 @@ unsigned int cstate;
|
||||
/* Slave is in catchup mode */
|
||||
action = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_ERROR("slave->cstate does not contain a meaningful state %d", slave->cstate);
|
||||
action = 0;
|
||||
}
|
||||
slave->stats.n_actions[action-1]++;
|
||||
spinlock_release(&slave->catch_lock);
|
||||
|
||||
|
Reference in New Issue
Block a user