Simplify trx_state_eq()

This commit is contained in:
Marko Mäkelä 2019-09-05 12:00:15 +03:00
parent 2c9e75ccfe
commit 67e2252ba1

View file

@ -48,19 +48,14 @@ trx_state_eq(
switch (trx->state) {
case TRX_STATE_PREPARED:
case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx->state == state);
case TRX_STATE_ACTIVE:
assert_trx_nonlocking_or_in_list(trx);
return(state == trx->state);
case TRX_STATE_COMMITTED_IN_MEMORY:
check_trx_state(trx);
return(state == trx->state);
case TRX_STATE_NOT_STARTED:
/* These states are not allowed for running transactions. */
ut_a(state == TRX_STATE_NOT_STARTED