diff options
Diffstat (limited to 'innobase/trx/trx0roll.c')
-rw-r--r-- | innobase/trx/trx0roll.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c index 1f053aeed89..6a25304c7ef 100644 --- a/innobase/trx/trx0roll.c +++ b/innobase/trx/trx0roll.c @@ -73,8 +73,7 @@ trx_general_rollback_for_mysql( thr = pars_complete_graph_for_exec(roll_node, trx, heap); - ut_a(thr == que_fork_start_command(que_node_get_parent(thr), - SESS_COMM_EXECUTE, 0)); + ut_a(thr == que_fork_start_command(que_node_get_parent(thr))); que_run_threads(thr); mutex_enter(&kernel_mutex); @@ -354,8 +353,7 @@ trx_rollback_or_clean_all_without_sess(void) /* Open a dummy session */ if (!trx_dummy_sess) { - trx_dummy_sess = sess_open(NULL, (byte*)"Dummy sess", - ut_strlen((char *) "Dummy sess")); + trx_dummy_sess = sess_open(); } mutex_exit(&kernel_mutex); @@ -418,7 +416,7 @@ loop: trx->graph = fork; - ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0)); + ut_a(thr == que_fork_start_command(fork)); trx_roll_max_undo_no = ut_conv_dulint_to_longlong(trx->undo_no); trx_roll_progress_printed_pct = 0; @@ -678,8 +676,10 @@ trx_roll_try_truncate( dulint limit; dulint biggest; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&((trx->rseg)->mutex))); +#endif /* UNIV_SYNC_DEBUG */ trx->pages_undone = 0; @@ -722,7 +722,9 @@ trx_roll_pop_top_rec( trx_undo_rec_t* prev_rec; page_t* prev_rec_page; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); +#endif /* UNIV_SYNC_DEBUG */ undo_page = trx_undo_page_get_s_latched(undo->space, undo->top_page_no, mtr); @@ -946,7 +948,9 @@ trx_rollback( que_thr_t* thr; /* que_thr_t* thr2; */ +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#endif /* UNIV_SYNC_DEBUG */ ut_ad((trx->undo_no_arr == NULL) || ((trx->undo_no_arr)->n_used == 0)); /* Initialize the rollback field in the transaction */ @@ -981,11 +985,11 @@ trx_rollback( trx->graph = roll_graph; trx->que_state = TRX_QUE_ROLLING_BACK; - thr = que_fork_start_command(roll_graph, SESS_COMM_EXECUTE, 0); + thr = que_fork_start_command(roll_graph); ut_ad(thr); -/* thr2 = que_fork_start_command(roll_graph, SESS_COMM_EXECUTE, 0); +/* thr2 = que_fork_start_command(roll_graph); ut_ad(thr2); */ @@ -1015,7 +1019,9 @@ trx_roll_graph_build( que_thr_t* thr; /* que_thr_t* thr2; */ +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(512); fork = que_fork_create(NULL, NULL, QUE_FORK_ROLLBACK, heap); @@ -1042,7 +1048,9 @@ trx_finish_error_processing( trx_sig_t* sig; trx_sig_t* next_sig; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); @@ -1075,14 +1083,16 @@ trx_finish_partial_rollback_off_kernel( { trx_sig_t* sig; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); /* Remove the signal from the signal queue and send reply message to it */ - trx_sig_reply(trx, sig, next_thr); + trx_sig_reply(sig, next_thr); trx_sig_remove(trx, sig); trx->que_state = TRX_QUE_RUNNING; @@ -1106,7 +1116,9 @@ trx_finish_rollback_off_kernel( trx_sig_t* sig; trx_sig_t* next_sig; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#endif /* UNIV_SYNC_DEBUG */ ut_a(trx->undo_no_arr == NULL || trx->undo_no_arr->n_used == 0); @@ -1145,7 +1157,7 @@ trx_finish_rollback_off_kernel( if (sig->type == TRX_SIG_TOTAL_ROLLBACK) { - trx_sig_reply(trx, sig, next_thr); + trx_sig_reply(sig, next_thr); trx_sig_remove(trx, sig); } @@ -1213,7 +1225,7 @@ trx_rollback_step( success = trx_sig_send(thr_get_trx(thr), sig_no, TRX_SIG_SELF, - TRUE, thr, savept, NULL); + thr, savept, NULL); thr->state = QUE_THR_SIG_REPLY_WAIT; |