drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
mtr0log.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 mtr0log_h
28#define mtr0log_h
29
30#include "univ.i"
31#include "mtr0mtr.h"
32#include "dict0types.h"
33
34#ifndef UNIV_HOTBACKUP
35/********************************************************/
38UNIV_INTERN
39void
41/*=============*/
42 byte* ptr,
43 ulint val,
44 byte type,
45 mtr_t* mtr);
46/********************************************************/
49UNIV_INTERN
50void
52/*===========*/
53 byte* ptr,
54 ib_uint64_t val,
55 mtr_t* mtr);
56/********************************************************/
59UNIV_INTERN
60void
62/*==============*/
63 byte* ptr,
64 const byte* str,
65 ulint len,
66 mtr_t* mtr);
67/********************************************************/
70UNIV_INTERN
71void
73/*============*/
74 byte* ptr,
75 ulint len,
76 mtr_t* mtr);
77/********************************************************/
80UNIV_INTERN
81void
83/*==========================*/
84 const byte* ptr,
87 byte type,
88 mtr_t* mtr);
89/********************************************************/
92UNIV_INLINE
93byte*
95/*======================================*/
96 ulint type,
98 ulint space_id,
99 ulint page_no,
100 byte* log_ptr,
101 mtr_t* mtr);
102/********************************************************/
104UNIV_INLINE
105void
107/*================*/
108 mtr_t* mtr,
109 ulint val,
110 ulint type);
111/********************************************************/
113UNIV_INTERN
114void
116/*=================*/
117 mtr_t* mtr,
118 const byte* str,
119 ulint len);
120/********************************************************/
122UNIV_INLINE
123void
125/*===========================*/
126 mtr_t* mtr,
127 ulint val);
128/********************************************************/
130UNIV_INLINE
131void
133/*=========================*/
134 mtr_t* mtr,
135 ib_uint64_t val);
136/********************************************************/
139UNIV_INLINE
140byte*
142/*======*/
143 mtr_t* mtr,
144 ulint size);
146/********************************************************/
148UNIV_INLINE
149void
151/*=======*/
152 mtr_t* mtr,
153 byte* ptr);
154/********************************************************/
159UNIV_INLINE
160byte*
162/*===============================*/
163 const byte* ptr,
166 byte type,
167 byte* log_ptr,
169 mtr_t* mtr);
170#else /* !UNIV_HOTBACKUP */
171# define mlog_write_initial_log_record(ptr,type,mtr) ((void) 0)
172# define mlog_write_initial_log_record_fast(ptr,type,log_ptr,mtr) ((byte *) 0)
173#endif /* !UNIV_HOTBACKUP */
174/********************************************************/
177UNIV_INTERN
178byte*
180/*==========================*/
181 byte* ptr,
182 byte* end_ptr,
183 byte* type,
184 ulint* space,
185 ulint* page_no);
186/********************************************************/
189UNIV_INTERN
190byte*
192/*==============*/
193 ulint type,
194 byte* ptr,
195 byte* end_ptr,
196 byte* page,
197 void* page_zip);
198/********************************************************/
201UNIV_INTERN
202byte*
204/*==============*/
205 byte* ptr,
206 byte* end_ptr,
207 byte* page,
208 void* page_zip);
209
210#ifndef UNIV_HOTBACKUP
211/********************************************************/
217UNIV_INTERN
218byte*
220/*======================*/
221 mtr_t* mtr,
222 const byte* rec,
223 dict_index_t* index,
224 byte type,
225 ulint size);
227#endif /* !UNIV_HOTBACKUP */
228
229/********************************************************/
232UNIV_INTERN
233byte*
235/*=============*/
236 byte* ptr,
237 const byte* end_ptr,
238 ibool comp,
239 dict_index_t** index);
240
241#ifndef UNIV_HOTBACKUP
242/* Insert, update, and maybe other functions may use this value to define an
243extra mlog buffer size for variable size data */
244#define MLOG_BUF_MARGIN 256
245#endif /* !UNIV_HOTBACKUP */
246
247#ifndef UNIV_NONINL
248#include "mtr0log.ic"
249#endif
250
251#endif
UNIV_INTERN void mlog_write_initial_log_record(const byte *ptr, byte type, mtr_t *mtr)
Definition mtr0log.cc:68
UNIV_INTERN byte * mlog_parse_string(byte *ptr, byte *end_ptr, byte *page, void *page_zip)
Definition mtr0log.cc:388
UNIV_INTERN void mlog_write_string(byte *ptr, const byte *str, ulint len, mtr_t *mtr)
Definition mtr0log.cc:330
UNIV_INTERN void mlog_write_ull(byte *ptr, ib_uint64_t val, mtr_t *mtr)
Definition mtr0log.cc:293
UNIV_INLINE void mlog_catenate_ulint(mtr_t *mtr, ulint val, ulint type)
UNIV_INLINE byte * mlog_write_initial_log_record_fast(const byte *ptr, byte type, byte *log_ptr, mtr_t *mtr)
UNIV_INLINE void mlog_catenate_ulint_compressed(mtr_t *mtr, ulint val)
UNIV_INTERN byte * mlog_parse_initial_log_record(byte *ptr, byte *end_ptr, byte *type, ulint *space, ulint *page_no)
Definition mtr0log.cc:100
UNIV_INTERN byte * mlog_parse_index(byte *ptr, const byte *end_ptr, ibool comp, dict_index_t **index)
Definition mtr0log.cc:537
UNIV_INTERN void mlog_write_ulint(byte *ptr, ulint val, byte type, mtr_t *mtr)
Definition mtr0log.cc:247
UNIV_INLINE void mlog_close(mtr_t *mtr, byte *ptr)
UNIV_INLINE byte * mlog_write_initial_log_record_for_file_op(ulint type, ulint space_id, ulint page_no, byte *log_ptr, mtr_t *mtr)
UNIV_INLINE byte * mlog_open(mtr_t *mtr, ulint size)
UNIV_INTERN byte * mlog_open_and_write_index(mtr_t *mtr, const byte *rec, dict_index_t *index, byte type, ulint size)
Definition mtr0log.cc:440
UNIV_INTERN byte * mlog_parse_nbytes(ulint type, byte *ptr, byte *end_ptr, byte *page, void *page_zip)
Definition mtr0log.cc:140
UNIV_INTERN void mlog_catenate_string(mtr_t *mtr, const byte *str, ulint len)
Definition mtr0log.cc:44
UNIV_INTERN void mlog_log_string(byte *ptr, ulint len, mtr_t *mtr)
Definition mtr0log.cc:350
UNIV_INLINE void mlog_catenate_ull_compressed(mtr_t *mtr, ib_uint64_t val)