From d1bcc1f49f8080e9549d29e74b0676875b9ca96b Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 7 Sep 2016 12:40:10 +0530 Subject: [PATCH] Bug #24488141 ACTIVE UNDO TABLESPACE NOT UPDATED WHEN INNODB_UNDO_LOGS IS INCREASED Problem: ======== If we increase innodb_undo_logs value during startup. New rollback segment might get allocated during trx_sys_create_rseg(). Essentially, it would make these tablesapces active with transaction undo data and purge. But it doesn't come in active undo tablespaces. so these tablespace would never get truncated. Fix: === Increase the number of active undo tablespace when we are assigning the undo tablespace to the newly assigned rollback segment. Reviewed-by: Kevin Lewis Reviewed-by: Debarun Banerjee RB: 13746 --- storage/innobase/trx/trx0sys.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index 1ce9f49ba30..09719b40a46 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -921,6 +921,15 @@ trx_sys_create_rsegs() " requested innodb_undo_logs"; return(false); } + + /* Increase the number of active undo + tablespace in case new rollback segment + assigned to new undo tablespace. */ + if (space > srv_undo_tablespaces_active) { + srv_undo_tablespaces_active++; + + ut_ad(srv_undo_tablespaces_active == space); + } } }