summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0purge.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/trx/trx0purge.cc')
-rw-r--r--storage/innobase/trx/trx0purge.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index 393f044d23a..c0375f25fa6 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -262,7 +262,7 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
or in trx_rollback_recovered() in slow shutdown.
Before any transaction-generating background threads or the
- purge have been started, recv_recovery_rollback_active() can
+ purge have been started, we can
start transactions in row_merge_drop_temp_indexes() and
fts_drop_orphaned_tables(), and roll back recovered transactions.
@@ -584,11 +584,10 @@ static void trx_purge_truncate_history()
: 0, j = i;; ) {
ulint space_id = srv_undo_space_id_start + i;
ut_ad(srv_is_undo_tablespace(space_id));
+ fil_space_t* space= fil_space_get(space_id);
- if (fil_space_get_size(space_id)
- > threshold) {
- purge_sys.truncate.current
- = fil_space_get(space_id);
+ if (space && space->get_size() > threshold) {
+ purge_sys.truncate.current = space;
break;
}
@@ -680,7 +679,7 @@ not_free:
mini-transaction commit and the server was killed, then
discarding the to-be-trimmed pages without flushing would
break crash recovery. So, we cannot avoid the write. */
- buf_LRU_flush_or_remove_pages(space.id, true);
+ while (buf_flush_dirty_pages(space.id));
log_free_check();