1
1
/*****************************************************************************
3
Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
3
Copyright (C) 1996, 2011, Innobase Oy. All Rights Reserved.
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
72
trx_purge_sys_create(void);
73
/*======================*/
74
ib_bh_t* ib_bh); /*!< in/own: UNDO log min binary heap*/
74
75
/********************************************************************//**
75
76
Frees the global purge system control structure. */
129
130
ulint state; /*!< Purge system state */
130
131
sess_t* sess; /*!< System session running the purge
132
trx_t* trx; /*!< System transaction running the purge
133
trx_t* trx; /*!< System transaction running the
133
135
query: this trx is not in the trx list
134
136
of the trx system and it never ends */
135
137
que_t* query; /*!< The query graph which will do the
136
138
parallelized purge operation */
137
rw_lock_t latch; /*!< The latch protecting the purge view.
138
A purge operation must acquire an
139
x-latch here for the instant at which
139
rw_lock_t latch; /*!< The latch protecting the purge
140
view. A purge operation must acquire
141
an x-latch here for the instant at which
140
142
it changes the purge view: an undo
141
143
log operation can prevent this by
142
144
obtaining an s-latch here. */
143
145
read_view_t* view; /*!< The purge will not remove undo logs
144
146
which are >= this view (purge view) */
145
mutex_t mutex; /*!< Mutex protecting the fields below */
146
147
ulint n_pages_handled;/*!< Approximate number of undo log
147
148
pages processed in purge */
148
149
ulint handle_limit; /*!< Target of how many pages to get
180
181
mem_heap_t* heap; /*!< Temporary storage used during a
181
182
purge: can be emptied after purge
184
/*-----------------------------*/
185
ib_bh_t* ib_bh; /*!< Binary min-heap, ordered on
186
rseg_queue_t::trx_no. It is protected
188
mutex_t bh_mutex; /*!< Mutex protecting ib_bh */
185
191
#define TRX_PURGE_ON 1 /* purge operation is running */