diff options
author | Aditya A <aditya.a@oracle.com> | 2017-11-17 14:46:09 +0530 |
---|---|---|
committer | Aditya A <aditya.a@oracle.com> | 2017-11-17 14:46:09 +0530 |
commit | 63a540c8c3e93b7f15aec6260c0a85f1cd07f6dc (patch) | |
tree | f6e82dd350bd84fbe3400ad13a54cf98bebe3967 | |
parent | f06443ce5f9ca8a65b60b595b2095f76d8f65206 (diff) | |
download | mariadb-git-63a540c8c3e93b7f15aec6260c0a85f1cd07f6dc.tar.gz |
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]
-rw-r--r-- | storage/innobase/trx/trx0purge.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/storage/innobase/trx/trx0purge.c b/storage/innobase/trx/trx0purge.c index 0b3f389964b..ae384943c04 100644 --- a/storage/innobase/trx/trx0purge.c +++ b/storage/innobase/trx/trx0purge.c @@ -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; } |