MySQL 8.4.2
Source Code Documentation
fut0fut.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 1995, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/** @file include/fut0fut.h
29 File-based utilities
30
31 Created 12/13/1995 Heikki Tuuri
32 ***********************************************************************/
33
34#ifndef fut0fut_h
35#define fut0fut_h
36
37#include "univ.i"
38
39#include "fil0fil.h"
40#include "mtr0mtr.h"
41
42#ifndef UNIV_HOTBACKUP
43/** Gets a pointer to a file address and latches the page.
44@param[in] space Space id
45@param[in] page_size Page size
46@param[in] addr File address
47@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_SX_LATCH
48@param[out] ptr_block File page
49@param[in,out] mtr Mini-transaction
50@return pointer to a byte in (*ptr_block)->frame; the *ptr_block is
51bufferfixed and latched */
52[[nodiscard]] static inline byte *fut_get_ptr(
53 space_id_t space, const page_size_t &page_size, fil_addr_t addr,
54 rw_lock_type_t rw_latch, mtr_t *mtr, buf_block_t **ptr_block = nullptr);
55
56#include "fut0fut.ic"
57#endif /* !UNIV_HOTBACKUP */
58
59#endif /* fut0fut_h */
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:47
Page size descriptor.
Definition: page0size.h:50
The low-level file system.
static byte * fut_get_ptr(space_id_t space, const page_size_t &page_size, fil_addr_t addr, rw_lock_type_t rw_latch, mtr_t *mtr, buf_block_t **ptr_block=nullptr)
Gets a pointer to a file address and latches the page.
File-based utilities.
Mini-transaction buffer.
The buffer control block structure.
Definition: buf0buf.h:1747
File space address.
Definition: fil0fil.h:1176
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
rw_lock_type_t
Definition: sync0rw.h:97
Version control for database, common definitions, and include files.