diff options
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/include/trx0sys.h | 4 | ||||
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 13 |
3 files changed, 10 insertions, 11 deletions
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index 424e4447b41..e033a3e1fe4 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2021, MariaDB Corporation. +Copyright (c) 2017, 2022, MariaDB Corporation. 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 @@ -876,7 +876,7 @@ public: /** TRX_RSEG_HISTORY list length (number of committed transactions to purge) */ - MY_ALIGNED(CACHE_LINE_SIZE) Atomic_counter<uint32_t> rseg_history_len; + MY_ALIGNED(CACHE_LINE_SIZE) Atomic_counter<size_t> rseg_history_len; /** List of all transactions. */ thread_safe_trx_ilist_t trx_list; diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 381c59f4847..380f9201ef5 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4545,14 +4545,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, diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 121dfbbbf7d..a5857f7d653 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -523,9 +523,8 @@ static srv_sys_t srv_sys; struct purge_coordinator_state { /** Snapshot of the last history length before the purge call.*/ - uint32 m_history_length; - Atomic_counter<int> m_running; - purge_coordinator_state() : m_history_length(), m_running(0) {} + size_t m_history_length= 0; + Atomic_counter<int> m_running{0}; }; static purge_coordinator_state purge_state; @@ -1724,7 +1723,7 @@ static bool srv_purge_should_exit() return true; /* Slow shutdown was requested. */ - if (const uint32_t history_size= trx_sys.rseg_history_len) + if (const size_t history_size= trx_sys.rseg_history_len) { static time_t progress_time; time_t now= time(NULL); @@ -1733,7 +1732,7 @@ static bool srv_purge_should_exit() progress_time= now; #if defined HAVE_SYSTEMD && !defined EMBEDDED_LIBRARY service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, - "InnoDB: to purge %u transactions", + "InnoDB: to purge %zu transactions", history_size); ib::info() << "to purge " << history_size << " transactions"; #endif @@ -1784,13 +1783,13 @@ Atomic_counter<int> srv_purge_thread_count_changed; /** Do the actual purge operation. @param[in,out] n_total_purged total number of purged pages @return length of history list before the last purge batch. */ -static uint32_t srv_do_purge(ulint* n_total_purged) +static size_t srv_do_purge(ulint* n_total_purged) { ulint n_pages_purged; static ulint count = 0; static ulint n_use_threads = 0; - static uint32_t rseg_history_len = 0; + static size_t rseg_history_len = 0; ulint old_activity_count = srv_get_activity_count(); static ulint n_threads = srv_n_purge_threads; |