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:
Johan Wikman
2016-01-28 11:00:07 +02:00
parent 1a4fc56c67
commit 0deffbf2f2
2 changed files with 12 additions and 9 deletions

View File

@ -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);