InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
ha0ha.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 1994, 2011, 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 as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc.,
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17
*****************************************************************************/
18
19
/**************************************************/
26
#ifndef ha0ha_h
27
#define ha0ha_h
28
29
#include "
univ.i
"
30
31
#include "
hash0hash.h
"
32
#include "
page0types.h
"
33
#include "
buf0types.h
"
34
#include "
rem0types.h
"
35
36
/*************************************************************/
40
UNIV_INLINE
41
const
rec_t*
42
ha_search_and_get_data
(
43
/*===================*/
44
hash_table_t
* table,
45
ulint fold);
46
/*********************************************************/
50
UNIV_INTERN
51
ibool
52
ha_search_and_update_if_found_func
(
53
/*===============================*/
54
hash_table_t
* table,
55
ulint fold,
56
const
rec_t* data,
57
#
if
defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
58
buf_block_t
* new_block,
59
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
60
const
rec_t* new_data);
62
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
63
70
# define ha_search_and_update_if_found(table,fold,data,new_block,new_data) \
71
ha_search_and_update_if_found_func(table,fold,data,new_block,new_data)
72
#else
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
73
80
# define ha_search_and_update_if_found(table,fold,data,new_block,new_data) \
81
ha_search_and_update_if_found_func(table,fold,data,new_data)
82
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
83
/*************************************************************/
87
UNIV_INTERN
88
hash_table_t
*
89
ha_create_func
(
90
/*===========*/
91
ulint n,
92
#ifdef UNIV_SYNC_DEBUG
93
ulint mutex_level,
95
#endif
/* UNIV_SYNC_DEBUG */
96
ulint n_mutexes,
98
ulint type);
102
#ifdef UNIV_SYNC_DEBUG
103
110
# define ha_create(n_c,n_m,type,level) ha_create_func(n_c,level,n_m,type)
111
#else
/* UNIV_SYNC_DEBUG */
112
119
# define ha_create(n_c,n_m,type,level) ha_create_func(n_c,n_m,type)
120
#endif
/* UNIV_SYNC_DEBUG */
121
122
/*************************************************************/
124
UNIV_INTERN
125
void
126
ha_clear
(
127
/*=====*/
128
hash_table_t
* table);
130
/*************************************************************/
135
UNIV_INTERN
136
ibool
137
ha_insert_for_fold_func
(
138
/*====================*/
139
hash_table_t
* table,
140
ulint fold,
144
#
if
defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
145
buf_block_t
*
block
,
146
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
147
const
rec_t* data);
149
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
150
159
# define ha_insert_for_fold(t,f,b,d) do { \
160
ha_insert_for_fold_func(t,f,b,d); \
161
MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED); \
162
} while(0)
163
#else
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
164
173
# define ha_insert_for_fold(t,f,b,d) do { \
174
ha_insert_for_fold_func(t,f,d); \
175
MONITOR_INC(MONITOR_ADAPTIVE_HASH_ROW_ADDED); \
176
} while (0)
177
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
178
179
/*********************************************************/
183
UNIV_INLINE
184
ibool
185
ha_search_and_delete_if_found
(
186
/*==========================*/
187
hash_table_t
* table,
188
ulint fold,
189
const
rec_t* data);
190
#ifndef UNIV_HOTBACKUP
191
/*****************************************************************/
194
UNIV_INTERN
195
void
196
ha_remove_all_nodes_to_page
(
197
/*========================*/
198
hash_table_t
* table,
199
ulint fold,
200
const
page_t
* page);
201
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
202
/*************************************************************/
205
UNIV_INTERN
206
ibool
207
ha_validate
(
208
/*========*/
209
hash_table_t
* table,
210
ulint start_index,
211
ulint end_index);
212
#endif
/* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
213
/*************************************************************/
215
UNIV_INTERN
216
void
217
ha_print_info
(
218
/*==========*/
219
FILE* file,
220
hash_table_t
* table);
221
#endif
/* !UNIV_HOTBACKUP */
222
224
struct
ha_node_t
{
225
ha_node_t
*
next
;
226
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
227
buf_block_t
*
block
;
228
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
229
const
rec_t*
data
;
230
ulint
fold
;
231
};
232
233
#ifdef UNIV_DEBUG
234
/********************************************************************/
239
UNIV_INLINE
240
void
241
hash_assert_can_modify
(
242
/*===================*/
243
hash_table_t
* table,
244
ulint fold);
245
/********************************************************************/
249
UNIV_INLINE
250
void
251
hash_assert_can_search
(
252
/*===================*/
253
hash_table_t
* table,
254
ulint fold);
255
#else
/* UNIV_DEBUG */
256
#define hash_assert_can_modify(t, f)
257
#define hash_assert_can_search(t, f)
258
#endif
/* UNIV_DEBUG */
259
260
261
#ifndef UNIV_NONINL
262
#include "
ha0ha.ic
"
263
#endif
264
265
#endif
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2