| 1 |
/***************************************************************************** |
| 2 |
|
| 3 |
Copyright (c) 1996, 2026, Oracle and/or its affiliates. |
| 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 designed to work with certain software (including |
| 10 |
but not limited to OpenSSL) that is licensed under separate terms, |
| 11 |
as designated in a particular file or component or in included license |
| 12 |
documentation. The authors of MySQL hereby grant you an additional |
| 13 |
permission to link the program and your derivative works with the |
| 14 |
separately licensed software that they have either included with |
| 15 |
the program or referenced in the documentation. |
| 16 |
|
| 17 |
This program is distributed in the hope that it will be useful, but WITHOUT |
| 18 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 19 |
FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, |
| 20 |
for more details. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License along with |
| 23 |
this program; if not, write to the Free Software Foundation, Inc., |
| 24 |
51 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 */ |
| 46 |
struct btr_pcur_t; |
| 47 |
/** B-tree cursor */ |
| 48 |
struct btr_cur_t; |
| 49 |
/** B-tree search information for the adaptive hash index */ |
| 50 |
struct btr_search_t; |
| 51 |
|
| 52 |
/** Is search system enabled. |
| 53 |
Search system is protected by array of latches. */ |
| 54 |
extern std::atomic_bool btr_search_enabled; |
| 55 |
|
| 56 |
/** Number of adaptive hash index partition. */ |
| 57 |
extern ulong btr_ahi_parts; |
| 58 |
|
| 59 |
/** Structure to facilitate fast modulo for number of adaptive hash index |
| 60 |
partition. */ |
| 61 |
extern ut::fast_modulo_t btr_ahi_parts_fast_modulo; |
| 62 |
|
| 63 |
/** The size of a reference to data stored on a different page. |
| 64 |
The reference is stored at the end of the prefix of the field |
| 65 |
in the index record. */ |
| 66 |
constexpr uint32_t BTR_EXTERN_FIELD_REF_SIZE = FIELD_REF_SIZE; |
| 67 |
|
| 68 |
/** If the data don't exceed the size, the data are stored locally. */ |
| 69 |
constexpr uint32_t BTR_EXTERN_LOCAL_STORED_MAX_SIZE = |
| 70 |
BTR_EXTERN_FIELD_REF_SIZE * 2; |
| 71 |
|
| 72 |
#endif |