From 1c3dc21f2a15e94425ded3f176fd2df5cb3eb025 Mon Sep 17 00:00:00 2001 From: Inaam Rana Date: Tue, 26 Oct 2010 17:06:24 -0400 Subject: [PATCH] Bug #57611 ibdata file and continuous growing undo logs rb://498 Fix handling of update_undo_logs at trx commit. Previously, when rseg->update_undo_list grows beyond 500 the update_undo_logs were marked with state TRX_UNDO_TO_FREE which should have been TRX_UNDO_TO_PURGE. In 5.5 we don't need the heuristic as we support multiple rollback segments. Approved by: Sunny Bains --- storage/innobase/trx/trx0undo.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/storage/innobase/trx/trx0undo.c b/storage/innobase/trx/trx0undo.c index 9162c82e423..ef877f4844d 100644 --- a/storage/innobase/trx/trx0undo.c +++ b/storage/innobase/trx/trx0undo.c @@ -1830,19 +1830,7 @@ trx_undo_set_state_at_finish( && mach_read_from_2(page_hdr + TRX_UNDO_PAGE_FREE) < TRX_UNDO_PAGE_REUSE_LIMIT) { - /* This is a heuristic to avoid the problem of all UNDO - slots ending up in one of the UNDO lists. Previously if - the server crashed with all the slots in one of the lists, - transactions that required the slots of a different type - would fail for lack of slots. */ - - if (UT_LIST_GET_LEN(rseg->update_undo_list) < 500 - && UT_LIST_GET_LEN(rseg->insert_undo_list) < 500) { - - state = TRX_UNDO_CACHED; - } else { - state = TRX_UNDO_TO_FREE; - } + state = TRX_UNDO_CACHED; } else if (undo->type == TRX_UNDO_INSERT) {