Commit 63a540c8 authored by Aditya A's avatar Aditya A

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]
parent f06443ce
/*****************************************************************************
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
......@@ -737,15 +738,17 @@ trx_purge_rseg_get_next_history_log(
" 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;
}
......
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