summaryrefslogtreecommitdiff
path: root/storage/innobase/lock
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-05-25 14:06:04 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-05-25 14:06:04 +0300
commit99c8aed00d832d838ee4b746dc6ae18a8f281709 (patch)
tree3c0834f03e64bf0418f7bc584713b1ccd3ac8650 /storage/innobase/lock
parentc1d380aa883f9326f24eb2faf3f2d5dba43d9c85 (diff)
downloadmariadb-git-99c8aed00d832d838ee4b746dc6ae18a8f281709.tar.gz
MDEV-28601 InnoDB history list length was reverted to 32 bits
srv_do_purge(): In commit edde1f6e0d5f5a0115a5253c9b8d428af132f2d1 when the de-facto 32-bit trx_sys_t::history_size() was replaced with 32-bit trx_sys.rseg_history_len, some more variables were changed from ulint (size_t) to uint32_t. The history list length is the number of committed transactions whose undo logs are waiting to be purged. Each TRX_RSEG_HISTORY list is storing the number of entries in a 32-bit field and each transaction will occupy at least one undo log page. It is thinkable that the length of each TRX_RSEG_HISTORY list may approach the maximum representable number. The number cannot be exceeded, because the rollback segment header is allocated from the same tablespace as the undo log header pages it is pointing to, and because the page numbers of a tablespace are stored in 32 bits. In any case, it is possible that the total number of unpurged committed transactions cannot be represented in 32 but 39 bits (corresponding to 128 rollback segments and undo tablespaces).
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r--storage/innobase/lock/lock0lock.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 01a31b41662..a5ac7de0a92 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -4602,14 +4602,14 @@ lock_print_info_summary(
fprintf(file,
"Purge done for trx's n:o < " TRX_ID_FMT
" undo n:o < " TRX_ID_FMT " state: %s\n"
- "History list length %u\n",
+ "History list length %zu\n",
purge_sys.tail.trx_no,
purge_sys.tail.undo_no,
purge_sys.enabled()
? (purge_sys.running() ? "running"
: purge_sys.paused() ? "stopped" : "running but idle")
: "disabled",
- uint32_t{trx_sys.rseg_history_len});
+ size_t{trx_sys.rseg_history_len});
#ifdef PRINT_NUM_OF_LOCK_STRUCTS
fprintf(file,