Drizzled Public API Documentation

row0purge.h File Reference
#include "univ.i"
#include "data0data.h"
#include "btr0types.h"
#include "btr0pcur.h"
#include "dict0types.h"
#include "trx0types.h"
#include "que0types.h"
#include "row0types.h"

Go to the source code of this file.

Classes

struct  purge_node_struct
 

Functions

UNIV_INTERN purge_node_trow_purge_node_create (que_thr_t *parent, mem_heap_t *heap)
 
UNIV_INTERN ibool row_purge_poss_sec (purge_node_t *node, dict_index_t *index, const dtuple_t *entry)
 
UNIV_INTERN que_thr_trow_purge_step (que_thr_t *thr)
 

Detailed Description

Purge obsolete records

Created 3/14/1997 Heikki Tuuri

Definition in file row0purge.h.

Function Documentation

UNIV_INTERN purge_node_t* row_purge_node_create ( que_thr_t parent,
mem_heap_t heap 
)

Creates a purge node to a query graph.

Returns
own: purge node in: memory heap where created

Creates a purge node to a query graph.

Returns
own: purge node
Parameters
parentin: parent node, i.e., a thr node
heapin: memory heap where created

Definition at line 72 of file row0purge.cc.

References purge_node_struct::common, purge_node_struct::heap, mem_heap_alloc(), mem_heap_create, que_common_struct::parent, row_purge_node_create(), que_common_struct::type, and ut_ad.

Referenced by row_purge_node_create().

UNIV_INTERN ibool row_purge_poss_sec ( purge_node_t node,
dict_index_t index,
const dtuple_t entry 
)

Determines if it is possible to remove a secondary index entry. Removal is possible if the secondary index entry does not refer to any not delete marked version of a clustered index record where DB_TRX_ID is newer than the purge view.

NOTE: This function should only be called by the purge thread, only while holding a latch on the leaf page of the secondary index entry (or keeping the buffer pool watch on the page). It is possible that this function first returns TRUE and then FALSE, if a user transaction inserts a record that the secondary index entry would refer to. However, in that case, the user transaction would also re-insert the secondary index entry after purge has removed it and released the leaf page latch.

Returns
TRUE if the secondary index record can be purged in: secondary index entry

Determines if it is possible to remove a secondary index entry. Removal is possible if the secondary index entry does not refer to any not delete marked version of a clustered index record where DB_TRX_ID is newer than the purge view.

NOTE: This function should only be called by the purge thread, only while holding a latch on the leaf page of the secondary index entry (or keeping the buffer pool watch on the page). It is possible that this function first returns TRUE and then FALSE, if a user transaction inserts a record that the secondary index entry would refer to. However, in that case, the user transaction would also re-insert the secondary index entry after purge has removed it and released the leaf page latch.

Returns
TRUE if the secondary index record can be purged
Parameters
nodein/out: row purge node
indexin: secondary index
entryin: secondary index entry

Definition at line 254 of file row0purge.cc.

References btr_pcur_commit_specify_mtr(), btr_pcur_get_rec(), BTR_SEARCH_LEAF, dict_index_is_clust(), mtr_start(), purge_node_struct::pcur, row_purge_poss_sec(), row_vers_old_has_index_entry(), and ut_ad.

Referenced by btr_cur_search_to_nth_level(), and row_purge_poss_sec().

UNIV_INTERN que_thr_t* row_purge_step ( que_thr_t thr)

in: query thread

Does the purge operation for a single undo log record. This is a high-level function used in an SQL execution graph.

Returns
query thread to run next or NULL
Parameters
thrin: query thread

Definition at line 794 of file row0purge.cc.

References que_node_get_type(), row_purge_step(), que_thr_struct::run_node, ut_a, and ut_ad.

Referenced by row_purge_step().