trx0sys.c, trx0roll.c, srv0start.h:

Print trx rollback progress info in crash recovery


innobase/include/srv0start.h:
  Print trx rollback progress info in crash recovery
innobase/trx/trx0roll.c:
  Print trx rollback progress info in crash recovery
innobase/trx/trx0sys.c:
  Print trx rollback progress info in crash recovery
This commit is contained in:
unknown 2003-03-02 22:34:09 +02:00
commit 5387425aeb
3 changed files with 69 additions and 7 deletions

View file

@ -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),