Skip to content

Commit cf4b1dd

Browse files
author
Bin Su
committed
Merge branch 'mysql-5.7' into mysql-8.0
2 parents d0a59a0 + 078fc08 commit cf4b1dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

storage/innobase/trx/trx0trx.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,6 +2843,7 @@ void trx_set_rw_mode(trx_t *trx) /*!< in/out: transaction that is RW */
28432843
ut_ad(trx->rsegs.m_redo.rseg == 0);
28442844
ut_ad(!trx->in_rw_trx_list);
28452845
ut_ad(!trx_is_autocommit_non_locking(trx));
2846+
ut_ad(!trx->read_only);
28462847

28472848
if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) {
28482849
return;
@@ -2879,11 +2880,9 @@ void trx_set_rw_mode(trx_t *trx) /*!< in/out: transaction that is RW */
28792880
}
28802881
#endif /* UNIV_DEBUG */
28812882

2882-
if (!trx->read_only) {
2883-
UT_LIST_ADD_FIRST(trx_sys->rw_trx_list, trx);
2883+
UT_LIST_ADD_FIRST(trx_sys->rw_trx_list, trx);
28842884

2885-
ut_d(trx->in_rw_trx_list = true);
2886-
}
2885+
ut_d(trx->in_rw_trx_list = true);
28872886

28882887
mutex_exit(&trx_sys->mutex);
28892888
}

0 commit comments

Comments
 (0)