Drizzled Public API Documentation

mtr0log.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 mtr0log_h
00028 #define mtr0log_h
00029 
00030 #include "univ.i"
00031 #include "mtr0mtr.h"
00032 #include "dict0types.h"
00033 
00034 #ifndef UNIV_HOTBACKUP
00035 /********************************************************/
00038 UNIV_INTERN
00039 void
00040 mlog_write_ulint(
00041 /*=============*/
00042   byte* ptr,  
00043   ulint val,  
00044   byte  type, 
00045   mtr_t*  mtr); 
00046 /********************************************************/
00049 UNIV_INTERN
00050 void
00051 mlog_write_ull(
00052 /*===========*/
00053   byte*   ptr,  
00054   ib_uint64_t val,  
00055   mtr_t*    mtr); 
00056 /********************************************************/
00059 UNIV_INTERN
00060 void
00061 mlog_write_string(
00062 /*==============*/
00063   byte*   ptr,  
00064   const byte* str,  
00065   ulint   len,  
00066   mtr_t*    mtr); 
00067 /********************************************************/
00070 UNIV_INTERN
00071 void
00072 mlog_log_string(
00073 /*============*/
00074   byte* ptr,  
00075   ulint len,  
00076   mtr_t*  mtr); 
00077 /********************************************************/
00080 UNIV_INTERN
00081 void
00082 mlog_write_initial_log_record(
00083 /*==========================*/
00084   const byte* ptr,  
00087   byte    type, 
00088   mtr_t*    mtr); 
00089 /********************************************************/
00092 UNIV_INLINE
00093 byte*
00094 mlog_write_initial_log_record_for_file_op(
00095 /*======================================*/
00096   ulint type, 
00098   ulint space_id,
00099   ulint page_no,
00100   byte* log_ptr,
00101   mtr_t*  mtr); 
00102 /********************************************************/
00104 UNIV_INLINE
00105 void
00106 mlog_catenate_ulint(
00107 /*================*/
00108   mtr_t*  mtr,  
00109   ulint val,  
00110   ulint type);  
00111 /********************************************************/
00113 UNIV_INTERN
00114 void
00115 mlog_catenate_string(
00116 /*=================*/
00117   mtr_t*    mtr,  
00118   const byte* str,  
00119   ulint   len); 
00120 /********************************************************/
00122 UNIV_INLINE
00123 void
00124 mlog_catenate_ulint_compressed(
00125 /*===========================*/
00126   mtr_t*  mtr,  
00127   ulint val); 
00128 /********************************************************/
00130 UNIV_INLINE
00131 void
00132 mlog_catenate_ull_compressed(
00133 /*=========================*/
00134   mtr_t*    mtr,  
00135   ib_uint64_t val); 
00136 /********************************************************/
00139 UNIV_INLINE
00140 byte*
00141 mlog_open(
00142 /*======*/
00143   mtr_t*  mtr,  
00144   ulint size);  
00146 /********************************************************/
00148 UNIV_INLINE
00149 void
00150 mlog_close(
00151 /*=======*/
00152   mtr_t*  mtr,  
00153   byte* ptr); 
00154 /********************************************************/
00159 UNIV_INLINE
00160 byte*
00161 mlog_write_initial_log_record_fast(
00162 /*===============================*/
00163   const byte* ptr,  
00166   byte    type, 
00167   byte*   log_ptr,
00169   mtr_t*    mtr); 
00170 #else /* !UNIV_HOTBACKUP */
00171 # define mlog_write_initial_log_record(ptr,type,mtr) ((void) 0)
00172 # define mlog_write_initial_log_record_fast(ptr,type,log_ptr,mtr) ((byte *) 0)
00173 #endif /* !UNIV_HOTBACKUP */
00174 /********************************************************/
00177 UNIV_INTERN
00178 byte*
00179 mlog_parse_initial_log_record(
00180 /*==========================*/
00181   byte* ptr,  
00182   byte* end_ptr,
00183   byte* type, 
00184   ulint*  space,  
00185   ulint*  page_no);
00186 /********************************************************/
00189 UNIV_INTERN
00190 byte*
00191 mlog_parse_nbytes(
00192 /*==============*/
00193   ulint type, 
00194   byte* ptr,  
00195   byte* end_ptr,
00196   byte* page, 
00197   void* page_zip);
00198 /********************************************************/
00201 UNIV_INTERN
00202 byte*
00203 mlog_parse_string(
00204 /*==============*/
00205   byte* ptr,  
00206   byte* end_ptr,
00207   byte* page, 
00208   void* page_zip);
00210 #ifndef UNIV_HOTBACKUP
00211 /********************************************************/
00217 UNIV_INTERN
00218 byte*
00219 mlog_open_and_write_index(
00220 /*======================*/
00221   mtr_t*    mtr,  
00222   const byte* rec,  
00223   dict_index_t* index,  
00224   byte    type, 
00225   ulint   size);  
00227 #endif /* !UNIV_HOTBACKUP */
00228 
00229 /********************************************************/
00232 UNIV_INTERN
00233 byte*
00234 mlog_parse_index(
00235 /*=============*/
00236   byte*   ptr,  
00237   const byte* end_ptr,
00238   ibool   comp, 
00239   dict_index_t**  index); 
00241 #ifndef UNIV_HOTBACKUP
00242 /* Insert, update, and maybe other functions may use this value to define an
00243 extra mlog buffer size for variable size data */
00244 #define MLOG_BUF_MARGIN 256
00245 #endif /* !UNIV_HOTBACKUP */
00246 
00247 #ifndef UNIV_NONINL
00248 #include "mtr0log.ic"
00249 #endif
00250 
00251 #endif