drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
trx0purge.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2011, 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 trx0purge_h
28#define trx0purge_h
29
30#include "univ.i"
31#include "trx0types.h"
32#include "mtr0mtr.h"
33#include "trx0sys.h"
34#include "que0types.h"
35#include "page0page.h"
36#include "usr0sess.h"
37#include "fil0fil.h"
38
41
45
46/********************************************************************/
50UNIV_INLINE
53/*========================*/
54 fil_addr_t node_addr);
56/*****************************************************************/
62UNIV_INTERN
63ibool
65/*=============================*/
66 trx_id_t trx_id);
67/********************************************************************/
70UNIV_INTERN
71void
73/*=================*/
74 ib_bh_t* ib_bh);
75/********************************************************************/
77UNIV_INTERN
78void
80/*======================*/
81/************************************************************************
82Adds the update undo log as the first log in the history list. Removes the
83update undo log segment from the rseg slot if it is too big for reuse. */
84UNIV_INTERN
85void
87/*=================================*/
88 trx_t* trx,
89 page_t* undo_page,
91 mtr_t* mtr);
92/********************************************************************/
97UNIV_INTERN
100/*=====================*/
101 roll_ptr_t* roll_ptr,
102 trx_undo_inf_t** cell,
104 mem_heap_t* heap);
105/*******************************************************************/
107UNIV_INTERN
108void
110/*==================*/
111 trx_undo_inf_t* cell);
112/*******************************************************************/
115UNIV_INTERN
116ulint
118/*======*/
119 ulint limit);
121/******************************************************************/
123UNIV_INTERN
124void
126/*======================*/
127
130 ulint state;
131 sess_t* sess;
133 trx_t* trx;
137 que_t* query;
139 rw_lock_t latch;
145 read_view_t* view;
151 /*------------------------------*/
152 /* The following two fields form the 'purge pointer' which advances
153 during a purge, and which is used in history list truncation */
154
160 /*-----------------------------*/
168 ulint page_no;
171 ulint offset;
177 /*-----------------------------*/
181 mem_heap_t* heap;
184 /*-----------------------------*/
185 ib_bh_t* ib_bh;
189};
190
191#define TRX_PURGE_ON 1 /* purge operation is running */
192#define TRX_STOP_PURGE 2 /* purge operation is stopped, or
193 it should be stopped */
194#ifndef UNIV_NONINL
195#include "trx0purge.ic"
196#endif
197
198#endif
struct fil_addr_struct fil_addr_t
Definition fil0fil.h:64
#define page_t
Definition page0types.h:35
trx_undo_arr_t * arr
Definition trx0purge.h:178
trx_id_t purge_trx_no
Definition trx0purge.h:155
read_view_t * view
Definition trx0purge.h:145
ib_bh_t * ib_bh
Definition trx0purge.h:185
rw_lock_t latch
Definition trx0purge.h:139
mem_heap_t * heap
Definition trx0purge.h:181
undo_no_t purge_undo_no
Definition trx0purge.h:158
trx_rseg_t * rseg
Definition trx0purge.h:166
ulint n_pages_handled
Definition trx0purge.h:147
#define mutex_t
Definition sync0types.h:31
UNIV_INTERN void trx_purge_sys_create(ib_bh_t *ib_bh)
Definition trx0purge.cc:222
trx_purge_t * purge_sys
Definition trx0purge.cc:48
UNIV_INTERN void trx_purge_add_update_undo_to_history(trx_t *trx, page_t *undo_page, mtr_t *mtr)
Definition trx0purge.cc:313
UNIV_INTERN ulint trx_purge(ulint limit)
UNIV_INLINE fil_addr_t trx_purge_get_log_from_hist(fil_addr_t node_addr)
trx_undo_rec_t trx_purge_dummy_rec
Definition trx0purge.cc:52
UNIV_INTERN void trx_purge_sys_print(void)
UNIV_INTERN ibool trx_purge_update_undo_must_exist(trx_id_t trx_id)
Definition trx0purge.cc:72
UNIV_INTERN void trx_purge_sys_close(void)
Definition trx0purge.cc:269
UNIV_INTERN void trx_purge_rec_release(trx_undo_inf_t *cell)
UNIV_INTERN trx_undo_rec_t * trx_purge_fetch_next_rec(roll_ptr_t *roll_ptr, trx_undo_inf_t **cell, mem_heap_t *heap)
byte trx_undo_rec_t
Definition trx0types.h:112
ib_id_t undo_no_t
Definition trx0types.h:89
struct trx_purge_struct trx_purge_t
Definition trx0types.h:58
struct trx_undo_inf_struct trx_undo_inf_t
Definition trx0types.h:56
ib_id_t trx_id_t
Definition trx0types.h:85
ib_id_t roll_ptr_t
Definition trx0types.h:87
struct trx_undo_arr_struct trx_undo_arr_t
Definition trx0types.h:54
struct trx_rseg_struct trx_rseg_t
Definition trx0types.h:50