MySQL 8.4.2
Source Code Documentation
btr0cur.ic File Reference

The index tree cursor. More...

#include "btr0btr.h"

Macros

#define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)
 

Functions

static page_cur_tbtr_cur_get_page_cur (const btr_cur_t *cursor)
 Returns the page cursor component of a tree cursor. More...
 
static buf_block_tbtr_cur_get_block (const btr_cur_t *cursor)
 Returns the buffer block on which the tree cursor is positioned. More...
 
static rec_tbtr_cur_get_rec (const btr_cur_t *cursor)
 Returns the record pointer of a tree cursor. More...
 
static page_zip_des_tbtr_cur_get_page_zip (btr_cur_t *cursor)
 Returns the compressed page on which the tree cursor is positioned. More...
 
static page_tbtr_cur_get_page (btr_cur_t *cursor)
 Returns the page of a tree cursor. More...
 
static void btr_cur_position (dict_index_t *index, rec_t *rec, buf_block_t *block, btr_cur_t *cursor)
 Positions a tree cursor at a given record. More...
 
static bool btr_cur_compress_recommendation (btr_cur_t *cursor, mtr_t *mtr)
 Checks if compressing an index page where a btr cursor is placed makes sense. More...
 
static bool btr_cur_can_delete_without_compress (btr_cur_t *cursor, ulint rec_size, mtr_t *mtr)
 Checks if the record on which the cursor is placed can be deleted without making tree compression necessary (or, recommended). More...
 
static void btr_rec_set_deleted_flag (rec_t *rec, page_zip_des_t *page_zip, bool flag)
 

Detailed Description

The index tree cursor.

Created 10/16/1994 Heikki Tuuri

Macro Definition Documentation

◆ LIMIT_OPTIMISTIC_INSERT_DEBUG

#define LIMIT_OPTIMISTIC_INSERT_DEBUG (   NREC,
  CODE 
)
Value:
CODE; \
}
uint btr_cur_limit_optimistic_insert_debug
Definition: btr0cur.cc:143
unsigned long int ulint
Definition: univ.i:406

Function Documentation

◆ btr_cur_can_delete_without_compress()

static bool btr_cur_can_delete_without_compress ( btr_cur_t cursor,
ulint  rec_size,
mtr_t mtr 
)
inlinestatic

Checks if the record on which the cursor is placed can be deleted without making tree compression necessary (or, recommended).

Returns
true if can be deleted without recommended compression
Parameters
cursorin: btr cursor
rec_sizein: rec_get_size(btr_cur_get_rec(cursor))
mtrin: mtr

◆ btr_cur_compress_recommendation()

static bool btr_cur_compress_recommendation ( btr_cur_t cursor,
mtr_t mtr 
)
inlinestatic

Checks if compressing an index page where a btr cursor is placed makes sense.

Returns
true if compression is recommended
Parameters
cursorin: btr cursor
mtrin: mtr

◆ btr_cur_get_block()

static buf_block_t * btr_cur_get_block ( const btr_cur_t cursor)
inlinestatic

Returns the buffer block on which the tree cursor is positioned.

Returns
pointer to buffer block
Parameters
cursorin: tree cursor

◆ btr_cur_get_page()

static page_t * btr_cur_get_page ( btr_cur_t cursor)
inlinestatic

Returns the page of a tree cursor.

Returns
pointer to page
Parameters
cursorin: tree cursor

◆ btr_cur_get_page_cur()

static page_cur_t * btr_cur_get_page_cur ( const btr_cur_t cursor)
inlinestatic

Returns the page cursor component of a tree cursor.

Returns
pointer to page cursor component
Parameters
cursorin: tree cursor

◆ btr_cur_get_page_zip()

static page_zip_des_t * btr_cur_get_page_zip ( btr_cur_t cursor)
inlinestatic

Returns the compressed page on which the tree cursor is positioned.

Returns
pointer to compressed page, or NULL if the page is not compressed
Parameters
cursorin: tree cursor

◆ btr_cur_get_rec()

static rec_t * btr_cur_get_rec ( const btr_cur_t cursor)
inlinestatic

Returns the record pointer of a tree cursor.

Returns
pointer to record
Parameters
cursorin: tree cursor

◆ btr_cur_position()

static void btr_cur_position ( dict_index_t index,
rec_t rec,
buf_block_t block,
btr_cur_t cursor 
)
inlinestatic

Positions a tree cursor at a given record.

Parameters
indexin: index
recin: record in tree
blockin: buffer block of rec
cursorout: cursor

◆ btr_rec_set_deleted_flag()

static void btr_rec_set_deleted_flag ( rec_t rec,
page_zip_des_t page_zip,
bool  flag 
)
inlinestatic