mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Simplify trx_state_eq()
This commit is contained in:
parent
2c9e75ccfe
commit
67e2252ba1
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue