Commit c6766305 authored by unknown's avatar unknown

trx0undo.c, trx0purge.c:

  Print a warning to the .err log if the InnoDB history list length is > 20 000 even though purge reaches the list head; this is to track corruption reported on the MySQL mailing list Nov 9, 2004
lock0lock.c:
  Let SHOW INNODB STATUS print the history list length


innobase/lock/lock0lock.c:
  Let SHOW INNODB STATUS print the history list length
innobase/trx/trx0purge.c:
  Print a warning to the .err log if the InnoDB history list length is > 20 000 even though purge reaches the list head; this is to track corruption reported on the MySQL mailing list Nov 9, 2004
innobase/trx/trx0undo.c:
  Print a warning to the .err log if the InnoDB history list length is > 20 000 even though purge reaches the list head; this is to track corruption reported on the MySQL mailing list Nov 9, 2004
parent cc89d439
...@@ -4063,6 +4063,9 @@ lock_print_info( ...@@ -4063,6 +4063,9 @@ lock_print_info(
(ulong) ut_dulint_get_high(purge_sys->purge_undo_no), (ulong) ut_dulint_get_high(purge_sys->purge_undo_no),
(ulong) ut_dulint_get_low(purge_sys->purge_undo_no)); (ulong) ut_dulint_get_low(purge_sys->purge_undo_no));
fprintf(file,
"History list length %lu\n", (ulong) trx_sys->rseg_history_len);
fprintf(file, fprintf(file,
"Total number of lock structs in row lock hash table %lu\n", "Total number of lock structs in row lock hash table %lu\n",
(ulong) lock_get_n_rec_locks()); (ulong) lock_get_n_rec_locks());
......
...@@ -646,6 +646,27 @@ trx_purge_rseg_get_next_history_log( ...@@ -646,6 +646,27 @@ trx_purge_rseg_get_next_history_log(
mutex_exit(&(rseg->mutex)); mutex_exit(&(rseg->mutex));
mtr_commit(&mtr); mtr_commit(&mtr);
mutex_enter(&kernel_mutex);
/* Add debug code to track history list corruption reported
on the MySQL mailing list on Nov 9, 2004. The fut0lst.c
file-based list was corrupt. The prev node pointer was
FIL_NULL, even though the list length was over 8 million nodes!
We assume that purge truncates the history list in moderate
size pieces, and if we here reach the head of the list, the
list cannot be longer than 20 000 undo logs now. */
if (trx_sys->rseg_history_len > 20000) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Warning: purge reached the head of the history list,\n"
"InnoDB: but its length is still reported as %lu! Make a detailed bug\n"
"InnoDB: report, and post it to bugs.mysql.com\n",
(ulong)trx_sys->rseg_history_len);
}
mutex_exit(&kernel_mutex);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment