MySQL 8.0.39
Source Code Documentation
btr0types.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 1996, 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/btr0types.h
29 The index tree general types
30
31 Created 2/17/1996 Heikki Tuuri
32 *************************************************************************/
33
34#ifndef btr0types_h
35#define btr0types_h
36
37#include "univ.i"
38
39#include "page0size.h"
40#include "page0types.h"
41#include "rem0types.h"
42#include "sync0rw.h"
43#include "ut0rnd.h"
44
45/** Persistent cursor */
46struct btr_pcur_t;
47/** B-tree cursor */
48struct btr_cur_t;
49/** B-tree search information for the adaptive hash index */
50struct btr_search_t;
51
52/** Is search system enabled.
53Search system is protected by array of latches. */
54extern std::atomic_bool btr_search_enabled;
55
56/** Number of adaptive hash index partition. */
57extern ulong btr_ahi_parts;
58
59/** Structure to facilitate fast modulo for number of adaptive hash index
60partition. */
62
63/** The size of a reference to data stored on a different page.
64The reference is stored at the end of the prefix of the field
65in the index record. */
67
68/** If the data don't exceed the size, the data are stored locally. */
71
72#endif
ut::fast_modulo_t btr_ahi_parts_fast_modulo
Structure to facilitate fast modulo for number of adaptive hash index partition.
std::atomic_bool btr_search_enabled
Is search system enabled.
Definition: btr0sea.cc:63
constexpr uint32_t BTR_EXTERN_FIELD_REF_SIZE
The size of a reference to data stored on a different page.
Definition: btr0types.h:66
ulong btr_ahi_parts
Number of adaptive hash index partition.
Definition: btr0sea.cc:73
constexpr uint32_t BTR_EXTERN_LOCAL_STORED_MAX_SIZE
If the data don't exceed the size, the data are stored locally.
Definition: btr0types.h:69
Allows to execute x % mod for a specified mod in a fast way, without using a slow operation of divisi...
Definition: ut0math.h:145
A class describing a page size.
constexpr size_t FIELD_REF_SIZE
Definition: page0size.h:39
Index page routines.
Record manager global types.
The tree cursor: the definition appears here only for the compiler to know struct size!
Definition: btr0cur.h:668
Definition: btr0pcur.h:99
The search info struct in an index.
Definition: btr0sea.h:46
The read-write lock (for threads, not for database transactions)
Version control for database, common definitions, and include files.
Random numbers and hashing.