|
1 | 1 | /*****************************************************************************
|
2 | 2 |
|
3 | 3 | Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
4 |
| -Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. |
| 4 | +Copyright (c) 2017, 2018, MariaDB Corporation. |
5 | 5 |
|
6 | 6 | This program is free software; you can redistribute it and/or modify it under
|
7 | 7 | the terms of the GNU General Public License as published by the Free Software
|
@@ -243,18 +243,20 @@ trx_purge_add_update_undo_to_history(
|
243 | 243 | hist_size + undo->size, MLOG_4BYTES, mtr);
|
244 | 244 | }
|
245 | 245 |
|
246 |
| - /* Before any transaction-generating background threads or the |
| 246 | + /* After the purge thread has been given permission to exit, |
| 247 | + we may roll back transactions (trx->undo_no==0) |
| 248 | + in THD::cleanup() invoked from unlink_thd() in fast shutdown, |
| 249 | + or in trx_rollback_resurrected() in slow shutdown. |
| 250 | +
|
| 251 | + Before any transaction-generating background threads or the |
247 | 252 | purge have been started, recv_recovery_rollback_active() can
|
248 | 253 | start transactions in row_merge_drop_temp_indexes() and
|
249 |
| - fts_drop_orphaned_tables(), and roll back recovered transactions. |
250 |
| - After the purge thread has been given permission to exit, |
251 |
| - in fast shutdown, we may roll back transactions (trx->undo_no==0) |
252 |
| - in THD::cleanup() invoked from unlink_thd(). */ |
| 254 | + fts_drop_orphaned_tables(), and roll back recovered transactions. */ |
253 | 255 | ut_ad(srv_undo_sources
|
| 256 | + || trx->undo_no == 0 |
254 | 257 | || ((srv_startup_is_before_trx_rollback_phase
|
255 | 258 | || trx_rollback_or_clean_is_active)
|
256 |
| - && purge_sys->state == PURGE_STATE_INIT) |
257 |
| - || (trx->undo_no == 0 && srv_fast_shutdown)); |
| 259 | + && purge_sys->state == PURGE_STATE_INIT)); |
258 | 260 |
|
259 | 261 | /* Add the log as the first in the history list */
|
260 | 262 | flst_add_first(rseg_header + TRX_RSEG_HISTORY,
|
|
0 commit comments