mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 23:34:34 +01:00
8f18616ef0
and lexer files). From now on, the following Emacs cc-mode settings apply when indenting C function bodies in InnoDB: (setq c-basic-offset 8) (setq c-label-minimum-indentation 0) (add-to-list 'c-offsets-alist '(c . 0)) (add-to-list 'c-offsets-alist '(label . [0])) The indentation rules for function declarations still have not been formalized, and they must be formatted manually. Try to limit all lines to at most 79 characters (assuming TAB stops every 8 characters) by splitting lines before opening parenthesis, or at string constants. Fix some grammar mistakes in diagnostic output: match to, match with -> match found from -> found in trying rename -> trying to rename Fix an error in page_check_dir(): it said "supremum not pointed to" when the infimum was not pointed to. Enclose commented-out code snippets in #if 0 ... #endif instead of /* ... */. Add (void*) casts to some %p parameters in fprintf() calls. Try to split lines before a binary operator, not after one. (These three fixes were not made everywhere.)
79 lines
2.4 KiB
C
79 lines
2.4 KiB
C
/******************************************************
|
|
Purge obsolete records
|
|
|
|
(c) 1997 Innobase Oy
|
|
|
|
Created 3/14/1997 Heikki Tuuri
|
|
*******************************************************/
|
|
|
|
#ifndef row0purge_h
|
|
#define row0purge_h
|
|
|
|
#include "univ.i"
|
|
#include "data0data.h"
|
|
#include "btr0types.h"
|
|
#include "btr0pcur.h"
|
|
#include "dict0types.h"
|
|
#include "trx0types.h"
|
|
#include "que0types.h"
|
|
#include "row0types.h"
|
|
|
|
/************************************************************************
|
|
Creates a purge node to a query graph. */
|
|
|
|
purge_node_t*
|
|
row_purge_node_create(
|
|
/*==================*/
|
|
/* out, own: purge node */
|
|
que_thr_t* parent, /* in: parent node, i.e., a thr node */
|
|
mem_heap_t* heap); /* in: memory heap where created */
|
|
/***************************************************************
|
|
Does the purge operation for a single undo log record. This is a high-level
|
|
function used in an SQL execution graph. */
|
|
|
|
que_thr_t*
|
|
row_purge_step(
|
|
/*===========*/
|
|
/* out: query thread to run next or NULL */
|
|
que_thr_t* thr); /* in: query thread */
|
|
|
|
/* Purge node structure */
|
|
|
|
struct purge_node_struct{
|
|
que_common_t common; /* node type: QUE_NODE_PURGE */
|
|
/*----------------------*/
|
|
/* Local storage for this graph node */
|
|
dulint roll_ptr;/* roll pointer to undo log record */
|
|
trx_undo_rec_t* undo_rec;/* undo log record */
|
|
trx_undo_inf_t* reservation;/* reservation for the undo log record in
|
|
the purge array */
|
|
dulint undo_no;/* undo number of the record */
|
|
ulint rec_type;/* undo log record type: TRX_UNDO_INSERT_REC,
|
|
... */
|
|
btr_pcur_t pcur; /* persistent cursor used in searching the
|
|
clustered index record */
|
|
ibool found_clust;/* TRUE if the clustered index record
|
|
determined by ref was found in the clustered
|
|
index, and we were able to position pcur on
|
|
it */
|
|
dict_table_t* table; /* table where purge is done */
|
|
ulint cmpl_info;/* compiler analysis info of an update */
|
|
upd_t* update; /* update vector for a clustered index
|
|
record */
|
|
dtuple_t* ref; /* NULL, or row reference to the next row to
|
|
handle */
|
|
dtuple_t* row; /* NULL, or a copy (also fields copied to
|
|
heap) of the indexed fields of the row to
|
|
handle */
|
|
dict_index_t* index; /* NULL, or the next index whose record should
|
|
be handled */
|
|
mem_heap_t* heap; /* memory heap used as auxiliary storage for
|
|
row; this must be emptied after a successful
|
|
purge of a row */
|
|
};
|
|
|
|
#ifndef UNIV_NONINL
|
|
#include "row0purge.ic"
|
|
#endif
|
|
|
|
#endif
|