diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-03 07:23:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-03 07:23:18 +0200 |
commit | c14dd0d19d95460ad48f2657cf35c0cf26596ba0 (patch) | |
tree | 76b05373d9aedede9f7fd62e27e290989dff4613 | |
parent | 89a0364fc88efa7d91d02839a25fa22e4b276995 (diff) | |
download | mariadb-git-c14dd0d19d95460ad48f2657cf35c0cf26596ba0.tar.gz |
Cleanup: Remove RECV_READ_AHEAD_AREA
Let us directly use the constant 32 in recv_read_in_area().
-rw-r--r-- | storage/innobase/log/log0recv.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index dfadd9df37f..b600817b25d 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2,7 +2,7 @@ Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 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 @@ -56,9 +56,6 @@ Created 9/20/1997 Heikki Tuuri #include "srv0start.h" #include "fil0pagecompress.h" -/** Read-ahead area in applying log records to file pages */ -#define RECV_READ_AHEAD_AREA 32U - /** The recovery system */ recv_sys_t recv_sys; /** TRUE when recv_init_crash_recovery() has been called. */ @@ -2519,11 +2516,9 @@ page number. @param[in] page_id page id */ static void recv_read_in_area(page_id_t page_id) { - uint32_t page_nos[RECV_READ_AHEAD_AREA]; - compile_time_assert(ut_is_2pow(RECV_READ_AHEAD_AREA)); - page_id.set_page_no(ut_2pow_round(page_id.page_no(), - RECV_READ_AHEAD_AREA)); - const ulint up_limit = page_id.page_no() + RECV_READ_AHEAD_AREA; + uint32_t page_nos[32]; + page_id.set_page_no(ut_2pow_round(page_id.page_no(), 32U)); + const uint32_t up_limit = page_id.page_no() + 32; uint32_t* p = page_nos; for (recv_sys_t::map::iterator i= recv_sys.pages.lower_bound(page_id); |