mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Bug #24296076 INNODB REPORTS WARNING WHILE INNODB_UNDO_LOG_TRUNCATE IS ENABLED
PROBLEM ------- This warning message is printed when trx_sys->rseg_history_len is greater than some arbitrary magic number (2000000). By seeing the reproducing scenario where we keep a read view open and do a lot of transactions on table which increases the hitsory length it is entirely possible that trx_sys->rseg_history_len can exceed 2000000. So this is not a bug due to corruption of history length.The warning message was just added to test some scenario and not removed. FIX --- 1.Print this warning message only for debug versions. 2.Modified the warning message with more detailed information. 3.Don't crash even in debug versions. [#rb 17929 Reviewed by jimmy and satya]
This commit is contained in:
parent
f06443ce5f
commit
63a540c8c3
1 changed files with 10 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -721,6 +721,7 @@ trx_purge_rseg_get_next_history_log(
|
|||
mutex_exit(&(rseg->mutex));
|
||||
mtr_commit(&mtr);
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
/* Add debug code to track history list corruption reported
|
||||
|
@ -734,18 +735,20 @@ trx_purge_rseg_get_next_history_log(
|
|||
if (trx_sys->rseg_history_len > 2000000) {
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Warning: purge reached the"
|
||||
" 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 submit it"
|
||||
" to http://bugs.mysql.com\n",
|
||||
" reported as %lu!."
|
||||
" This can happen becasue a long"
|
||||
" running transaction is withholding"
|
||||
" purging of undo logs or a read"
|
||||
" view is open. Please try to commit"
|
||||
" the long running transaction.",
|
||||
(ulong) trx_sys->rseg_history_len);
|
||||
ut_ad(0);
|
||||
}
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue