Drizzled Public API Documentation

fsp0fsp.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; version 2 of the License.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT
00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with
00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
00015 St, Fifth Floor, Boston, MA 02110-1301 USA
00016 
00017 *****************************************************************************/
00018 
00019 /**************************************************/
00026 #pragma once
00027 #ifndef fsp0fsp_h
00028 #define fsp0fsp_h
00029 
00030 #include "univ.i"
00031 
00032 #include "mtr0mtr.h"
00033 #include "fut0lst.h"
00034 #include "ut0byte.h"
00035 #include "page0types.h"
00036 #include "fsp0types.h"
00037 
00038 /**********************************************************************/
00040 UNIV_INTERN
00041 void
00042 fsp_init(void);
00043 /*==========*/
00044 /**********************************************************************/
00050 UNIV_INTERN
00051 ulint
00052 fsp_header_get_free_limit(void);
00053 /*===========================*/
00054 /**********************************************************************/
00060 UNIV_INTERN
00061 ulint
00062 fsp_header_get_tablespace_size(void);
00063 /*================================*/
00064 /**********************************************************************/
00067 UNIV_INTERN
00068 ulint
00069 fsp_get_size_low(
00070 /*=============*/
00071   page_t* page);  
00072 /**********************************************************************/
00075 UNIV_INTERN
00076 ulint
00077 fsp_header_get_space_id(
00078 /*====================*/
00079   const page_t* page);  
00080 /**********************************************************************/
00083 UNIV_INTERN
00084 ulint
00085 fsp_header_get_flags(
00086 /*=================*/
00087   const page_t* page);  
00088 /**********************************************************************/
00091 UNIV_INTERN
00092 ulint
00093 fsp_header_get_zip_size(
00094 /*====================*/
00095   const page_t* page);  
00096 /**********************************************************************/
00100 UNIV_INTERN
00101 void
00102 fsp_header_init_fields(
00103 /*===================*/
00104   page_t* page,   
00105   ulint space_id, 
00106   ulint flags);   
00108 /**********************************************************************/
00111 UNIV_INTERN
00112 void
00113 fsp_header_init(
00114 /*============*/
00115   ulint space,    
00116   ulint size,   
00117   mtr_t*  mtr);   
00118 /**********************************************************************/
00120 UNIV_INTERN
00121 void
00122 fsp_header_inc_size(
00123 /*================*/
00124   ulint space,  
00125   ulint size_inc,
00126   mtr_t*  mtr); 
00127 /**********************************************************************/
00131 UNIV_INTERN
00132 buf_block_t*
00133 fseg_create(
00134 /*========*/
00135   ulint space,  
00136   ulint page, 
00140   ulint byte_offset, 
00142   mtr_t*  mtr); 
00143 /**********************************************************************/
00147 UNIV_INTERN
00148 buf_block_t*
00149 fseg_create_general(
00150 /*================*/
00151   ulint space,  
00152   ulint page, 
00156   ulint byte_offset, 
00158   ibool has_done_reservation, 
00164   mtr_t*  mtr); 
00165 /**********************************************************************/
00169 UNIV_INTERN
00170 ulint
00171 fseg_n_reserved_pages(
00172 /*==================*/
00173   fseg_header_t*  header, 
00174   ulint*    used, 
00175   mtr_t*    mtr); 
00176 /**********************************************************************/
00181 UNIV_INTERN
00182 ulint
00183 fseg_alloc_free_page(
00184 /*=================*/
00185   fseg_header_t*  seg_header, 
00186   ulint   hint, 
00187   byte    direction, 
00192   mtr_t*    mtr); 
00193 /**********************************************************************/
00198 UNIV_INTERN
00199 ulint
00200 fseg_alloc_free_page_general(
00201 /*=========================*/
00202   fseg_header_t*  seg_header,
00203   ulint   hint, 
00204   byte    direction,
00209   ibool   has_done_reservation, 
00214   mtr_t*    mtr); 
00215 /**********************************************************************/
00241 UNIV_INTERN
00242 ibool
00243 fsp_reserve_free_extents(
00244 /*=====================*/
00245   ulint*  n_reserved,
00248   ulint space,  
00249   ulint n_ext,  
00250   ulint alloc_type,
00251   mtr_t*  mtr); 
00252 /**********************************************************************/
00258 UNIV_INTERN
00259 ullint
00260 fsp_get_available_space_in_free_extents(
00261 /*====================================*/
00262   ulint space); 
00263 /**********************************************************************/
00265 UNIV_INTERN
00266 void
00267 fseg_free_page(
00268 /*===========*/
00269   fseg_header_t*  seg_header, 
00270   ulint   space,  
00271   ulint   page, 
00272   mtr_t*    mtr); 
00273 /**********************************************************************/
00279 UNIV_INTERN
00280 ibool
00281 fseg_free_step(
00282 /*===========*/
00283   fseg_header_t*  header, 
00287   mtr_t*    mtr); 
00288 /**********************************************************************/
00292 UNIV_INTERN
00293 ibool
00294 fseg_free_step_not_header(
00295 /*======================*/
00296   fseg_header_t*  header, 
00298   mtr_t*    mtr); 
00299 /***********************************************************************/
00302 UNIV_INLINE
00303 ibool
00304 fsp_descr_page(
00305 /*===========*/
00306   ulint zip_size,
00308   ulint page_no);
00309 /***********************************************************/
00312 UNIV_INTERN
00313 byte*
00314 fsp_parse_init_file_page(
00315 /*=====================*/
00316   byte*   ptr,  
00317   byte*   end_ptr, 
00318   buf_block_t*  block); 
00319 /*******************************************************************/
00322 UNIV_INTERN
00323 ibool
00324 fsp_validate(
00325 /*=========*/
00326   ulint space); 
00327 /*******************************************************************/
00329 UNIV_INTERN
00330 void
00331 fsp_print(
00332 /*======*/
00333   ulint space); 
00334 #ifdef UNIV_DEBUG
00335 /*******************************************************************/
00338 UNIV_INTERN
00339 ibool
00340 fseg_validate(
00341 /*==========*/
00342   fseg_header_t*  header, 
00343   mtr_t*    mtr); 
00344 #endif /* UNIV_DEBUG */
00345 #ifdef UNIV_BTR_PRINT
00346 /*******************************************************************/
00348 UNIV_INTERN
00349 void
00350 fseg_print(
00351 /*=======*/
00352   fseg_header_t*  header, 
00353   mtr_t*    mtr); 
00354 #endif /* UNIV_BTR_PRINT */
00355 
00356 #ifndef UNIV_NONINL
00357 #include "fsp0fsp.ic"
00358 #endif
00359 
00360 #endif