Commit c14dd0d1 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove RECV_READ_AHEAD_AREA

Let us directly use the constant 32 in recv_read_in_area().
parent 89a0364f
......@@ -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);
......
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