diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-11-21 17:38:15 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-11-21 17:38:15 +0200 |
commit | 5a7198f54d1a11ac7ef70a55c6a9b9044147df54 (patch) | |
tree | 261c300802896774ff092db5edc075d3b3b2f101 /innobase/trx | |
parent | 2d0011fce8545f0634674fe03647eb4c9ae4c66e (diff) | |
download | mariadb-git-5a7198f54d1a11ac7ef70a55c6a9b9044147df54.tar.gz |
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
Diffstat (limited to 'innobase/trx')
-rw-r--r-- | innobase/trx/trx0purge.c | 23 | ||||
-rw-r--r-- | innobase/trx/trx0undo.c | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c index 5c62640e011..3df34111281 100644 --- a/innobase/trx/trx0purge.c +++ b/innobase/trx/trx0purge.c @@ -289,7 +289,7 @@ trx_purge_add_update_undo_to_history( flst_get_len(seg_header + TRX_UNDO_PAGE_LIST, mtr)); mlog_write_ulint(rseg_header + TRX_RSEG_HISTORY_SIZE, - hist_size + undo->size, MLOG_4BYTES, mtr); + hist_size + undo->size, MLOG_4BYTES, mtr); } /* Add the log as the first in the history list */ @@ -646,6 +646,27 @@ trx_purge_rseg_get_next_history_log( mutex_exit(&(rseg->mutex)); 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; } diff --git a/innobase/trx/trx0undo.c b/innobase/trx/trx0undo.c index c1edc223cbc..8d1518753dd 100644 --- a/innobase/trx/trx0undo.c +++ b/innobase/trx/trx0undo.c @@ -1241,7 +1241,7 @@ trx_undo_lists_init( if (page_no != FIL_NULL && srv_force_recovery < SRV_FORCE_NO_UNDO_LOG_SCAN) { - + undo = trx_undo_mem_create_at_db_start(rseg, i, page_no, &mtr); size += undo->size; |