summaryrefslogtreecommitdiff
path: root/innobase/trx/trx0sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/trx/trx0sys.c')
-rw-r--r--innobase/trx/trx0sys.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 33c962772e8..1ae9f00ae1f 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -699,6 +699,9 @@ trx_sys_init_at_db_start(void)
/*==========================*/
{
trx_sysf_t* sys_header;
+ ib_longlong rows_to_undo = 0;
+ char* unit = (char*)"";
+ trx_t* trx;
mtr_t mtr;
mtr_start(&mtr);
@@ -734,9 +737,28 @@ trx_sys_init_at_db_start(void)
trx_lists_init_at_db_start();
if (UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
+ trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
+
+ for (;;) {
+ rows_to_undo +=
+ ut_conv_dulint_to_longlong(trx->undo_no);
+ trx = UT_LIST_GET_NEXT(trx_list, trx);
+
+ if (!trx) {
+ break;
+ }
+ }
+
+ if (rows_to_undo > 1000000000) {
+ unit = (char*)"M";
+ rows_to_undo = rows_to_undo / 1000000;
+ }
+
fprintf(stderr,
- "InnoDB: %lu transaction(s) which must be rolled back or cleaned up\n",
- UT_LIST_GET_LEN(trx_sys->trx_list));
+"InnoDB: %lu transaction(s) which must be rolled back or cleaned up\n"
+"InnoDB: in total %lu%s row operations to undo\n",
+ UT_LIST_GET_LEN(trx_sys->trx_list),
+ (ulint)rows_to_undo, unit);
fprintf(stderr, "InnoDB: Trx id counter is %lu %lu\n",
ut_dulint_get_high(trx_sys->max_trx_id),