drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
fsp0fsp.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
26#pragma once
27#ifndef fsp0fsp_h
28#define fsp0fsp_h
29
30#include "univ.i"
31
32#include "mtr0mtr.h"
33#include "fut0lst.h"
34#include "ut0byte.h"
35#include "page0types.h"
36#include "fsp0types.h"
37
38/**********************************************************************/
40UNIV_INTERN
41void
42fsp_init(void);
43/*==========*/
44/**********************************************************************/
50UNIV_INTERN
51ulint
53/*===========================*/
54/**********************************************************************/
60UNIV_INTERN
61ulint
63/*================================*/
64/**********************************************************************/
67UNIV_INTERN
68ulint
70/*=============*/
71 page_t* page);
72/**********************************************************************/
75UNIV_INTERN
76ulint
78/*====================*/
79 const page_t* page);
80/**********************************************************************/
83UNIV_INTERN
84ulint
86/*=================*/
87 const page_t* page);
88/**********************************************************************/
91UNIV_INTERN
92ulint
94/*====================*/
95 const page_t* page);
96/**********************************************************************/
100UNIV_INTERN
101void
103/*===================*/
104 page_t* page,
105 ulint space_id,
106 ulint flags);
108/**********************************************************************/
111UNIV_INTERN
112void
114/*============*/
115 ulint space,
116 ulint size,
117 mtr_t* mtr);
118/**********************************************************************/
120UNIV_INTERN
121void
123/*================*/
124 ulint space,
125 ulint size_inc,
126 mtr_t* mtr);
127/**********************************************************************/
131UNIV_INTERN
134/*========*/
135 ulint space,
136 ulint page,
140 ulint byte_offset,
142 mtr_t* mtr);
143/**********************************************************************/
147UNIV_INTERN
150/*================*/
151 ulint space,
152 ulint page,
156 ulint byte_offset,
158 ibool has_done_reservation,
164 mtr_t* mtr);
165/**********************************************************************/
169UNIV_INTERN
170ulint
172/*==================*/
173 fseg_header_t* header,
174 ulint* used,
175 mtr_t* mtr);
176/**********************************************************************/
181UNIV_INTERN
182ulint
184/*=================*/
185 fseg_header_t* seg_header,
186 ulint hint,
187 byte direction,
192 mtr_t* mtr);
193/**********************************************************************/
198UNIV_INTERN
199ulint
201/*=========================*/
202 fseg_header_t* seg_header,
203 ulint hint,
204 byte direction,
209 ibool has_done_reservation,
214 mtr_t* mtr);
215/**********************************************************************/
241UNIV_INTERN
242ibool
244/*=====================*/
245 ulint* n_reserved,
248 ulint space,
249 ulint n_ext,
250 ulint alloc_type,
251 mtr_t* mtr);
252/**********************************************************************/
258UNIV_INTERN
259ullint
261/*====================================*/
262 ulint space);
263/**********************************************************************/
265UNIV_INTERN
266void
268/*===========*/
269 fseg_header_t* seg_header,
270 ulint space,
271 ulint page,
272 mtr_t* mtr);
273/**********************************************************************/
279UNIV_INTERN
280ibool
282/*===========*/
283 fseg_header_t* header,
287 mtr_t* mtr);
288/**********************************************************************/
292UNIV_INTERN
293ibool
295/*======================*/
296 fseg_header_t* header,
298 mtr_t* mtr);
299/***********************************************************************/
302UNIV_INLINE
303ibool
305/*===========*/
306 ulint zip_size,
308 ulint page_no);
309/***********************************************************/
312UNIV_INTERN
313byte*
315/*=====================*/
316 byte* ptr,
317 byte* end_ptr,
318 buf_block_t* block);
319/*******************************************************************/
322UNIV_INTERN
323ibool
325/*=========*/
326 ulint space);
327/*******************************************************************/
329UNIV_INTERN
330void
332/*======*/
333 ulint space);
334#ifdef UNIV_DEBUG
335/*******************************************************************/
338UNIV_INTERN
339ibool
340fseg_validate(
341/*==========*/
342 fseg_header_t* header,
343 mtr_t* mtr);
344#endif /* UNIV_DEBUG */
345#ifdef UNIV_BTR_PRINT
346/*******************************************************************/
348UNIV_INTERN
349void
350fseg_print(
351/*=======*/
352 fseg_header_t* header,
353 mtr_t* mtr);
354#endif /* UNIV_BTR_PRINT */
355
356#ifndef UNIV_NONINL
357#include "fsp0fsp.ic"
358#endif
359
360#endif
struct buf_block_struct buf_block_t
Definition buf0types.h:33
UNIV_INLINE ibool fsp_descr_page(ulint zip_size, ulint page_no)
UNIV_INTERN void fsp_header_init(ulint space, ulint size, mtr_t *mtr)
Definition fsp0fsp.cc:911
UNIV_INTERN ulint fseg_n_reserved_pages(fseg_header_t *header, ulint *used, mtr_t *mtr)
Definition fsp0fsp.cc:2361
UNIV_INTERN ulint fseg_alloc_free_page(fseg_header_t *seg_header, ulint hint, byte direction, mtr_t *mtr)
Definition fsp0fsp.cc:2833
UNIV_INTERN void fsp_init(void)
Definition fsp0fsp.cc:874
UNIV_INTERN ulint fsp_get_size_low(page_t *page)
Definition fsp0fsp.cc:303
UNIV_INTERN ibool fseg_free_step(fseg_header_t *header, mtr_t *mtr)
Definition fsp0fsp.cc:3472
UNIV_INTERN ibool fseg_free_step_not_header(fseg_header_t *header, mtr_t *mtr)
Definition fsp0fsp.cc:3559
UNIV_INTERN ulint fsp_header_get_flags(const page_t *page)
Definition fsp0fsp.cc:1002
UNIV_INTERN ulint fsp_header_get_space_id(const page_t *page)
Definition fsp0fsp.cc:974
UNIV_INTERN void fsp_print(ulint space)
Definition fsp0fsp.cc:4132
UNIV_INTERN ulint fsp_header_get_free_limit(void)
Definition fsp0fsp.cc:1062
UNIV_INTERN void fsp_header_init_fields(page_t *page, ulint space_id, ulint flags)
Definition fsp0fsp.cc:886
UNIV_INTERN ulint fsp_header_get_tablespace_size(void)
Definition fsp0fsp.cc:1094
UNIV_INTERN ulint fsp_header_get_zip_size(const page_t *page)
Definition fsp0fsp.cc:1016
UNIV_INTERN byte * fsp_parse_init_file_page(byte *ptr, byte *end_ptr, buf_block_t *block)
Definition fsp0fsp.cc:855
UNIV_INTERN buf_block_t * fseg_create(ulint space, ulint page, ulint byte_offset, mtr_t *mtr)
Definition fsp0fsp.cc:2311
UNIV_INTERN buf_block_t * fseg_create_general(ulint space, ulint page, ulint byte_offset, ibool has_done_reservation, mtr_t *mtr)
Definition fsp0fsp.cc:2178
UNIV_INTERN void fseg_free_page(fseg_header_t *seg_header, ulint space, ulint page, mtr_t *mtr)
Definition fsp0fsp.cc:3363
UNIV_INTERN ibool fsp_validate(ulint space)
Definition fsp0fsp.cc:3880
UNIV_INTERN ulint fseg_alloc_free_page_general(fseg_header_t *seg_header, ulint hint, byte direction, ibool has_done_reservation, mtr_t *mtr)
Definition fsp0fsp.cc:2762
UNIV_INTERN void fsp_header_inc_size(ulint space, ulint size_inc, mtr_t *mtr)
Definition fsp0fsp.cc:1030
UNIV_INTERN ullint fsp_get_available_space_in_free_extents(ulint space)
Definition fsp0fsp.cc:3031
UNIV_INTERN ibool fsp_reserve_free_extents(ulint *n_reserved, ulint space, ulint n_ext, ulint alloc_type, mtr_t *mtr)
Definition fsp0fsp.cc:2915
#define page_t
Definition page0types.h:35