mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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:
parent
b331fe928c
commit
5387425aeb
3 changed files with 69 additions and 7 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue