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