MySQL 9.0.0
Source Code Documentation
gis0rtree.ic File Reference

R-tree Inline code. More...

Functions

static void rtr_page_cal_mbr (const dict_index_t *index, const buf_block_t *block, rtr_mbr_t *rtr_mbr, mem_heap_t *heap)
 Sets the child node mbr in a node pointer. More...
 
static void rtr_non_leaf_stack_push (rtr_node_path_t *path, page_no_t pageno, node_seq_t seq_no, ulint level, page_no_t child_no, btr_pcur_t *cursor, double mbr_inc)
 push a nonleaf index node to the search path More...
 
static node_seq_t rtr_get_new_ssn_id (dict_index_t *index)
 Allocates a new Split Sequence Number. More...
 
static node_seq_t rtr_get_current_ssn_id (dict_index_t *index)
 Get the current Split Sequence Number. More...
 
static void rtr_write_mbr (byte *data, const rtr_mbr_t *mbr)
 Sets pointer to the data and length in a field. More...
 
static void rtr_read_mbr (const byte *data, rtr_mbr_t *mbr)
 Sets pointer to the data and length in a field. More...
 
static node_visit_trtr_get_parent_node (btr_cur_t *btr_cur, ulint level, ulint is_insert)
 Returns the R-Tree node stored in the parent search path. More...
 
static btr_pcur_trtr_get_parent_cursor (btr_cur_t *btr_cur, ulint level, ulint is_insert)
 Returns the R-Tree cursor stored in the parent search path. More...
 
static void rtr_info_reinit_in_cursor (btr_cur_t *cursor, dict_index_t *index, bool need_prdt)
 Reinitialize a R-Tree search info in btr_cur_t. More...
 

Detailed Description

R-tree Inline code.

Created 2013/03/27 Jimmy Yang and Allen Lai

Function Documentation

◆ rtr_get_current_ssn_id()

static node_seq_t rtr_get_current_ssn_id ( dict_index_t index)
inlinestatic

Get the current Split Sequence Number.

Returns
current SSN id
Parameters
indexin: index struct

◆ rtr_get_new_ssn_id()

static node_seq_t rtr_get_new_ssn_id ( dict_index_t index)
inlinestatic

Allocates a new Split Sequence Number.

Returns
new SSN id
Parameters
indexin/out: the index struct

◆ rtr_get_parent_cursor()

static btr_pcur_t * rtr_get_parent_cursor ( btr_cur_t btr_cur,
ulint  level,
ulint  is_insert 
)
inlinestatic

Returns the R-Tree cursor stored in the parent search path.

Returns
pointer to R-Tree cursor component
Parameters
btr_curin: persistent cursor
levelin: index level of buffer page
is_insertin: whether insert operation

◆ rtr_get_parent_node()

static node_visit_t * rtr_get_parent_node ( btr_cur_t btr_cur,
ulint  level,
ulint  is_insert 
)
inlinestatic

Returns the R-Tree node stored in the parent search path.

Returns
pointer to R-Tree cursor component in the parent path, NULL if parent path is empty or index is larger than num of items contained
Parameters
btr_curin: persistent cursor
levelin: index level of buffer page
is_insertin: whether it is insert

◆ rtr_info_reinit_in_cursor()

static void rtr_info_reinit_in_cursor ( btr_cur_t cursor,
dict_index_t index,
bool  need_prdt 
)
inlinestatic

Reinitialize a R-Tree search info in btr_cur_t.

Parameters
cursor********************* in/out: tree cursor
indexin: index struct
need_prdtin: Whether predicate lock is needed

◆ rtr_non_leaf_stack_push()

static void rtr_non_leaf_stack_push ( rtr_node_path_t path,
page_no_t  pageno,
node_seq_t  seq_no,
ulint  level,
page_no_t  child_no,
btr_pcur_t cursor,
double  mbr_inc 
)
inlinestatic

push a nonleaf index node to the search path

Parameters
pathin/out: search path
pagenoin: pageno to insert
seq_noin: Node sequence num
levelin: index page level
child_noin: child page no
cursorin: position cursor
mbr_incin: MBR needs to be enlarged

◆ rtr_page_cal_mbr()

static void rtr_page_cal_mbr ( const dict_index_t index,
const buf_block_t block,
rtr_mbr_t rtr_mbr,
mem_heap_t heap 
)
inlinestatic

Sets the child node mbr in a node pointer.

Parameters
indexin: index
blockin: buffer block
rtr_mbrout: MBR encapsulates the page
heapin: heap for the memory allocation

◆ rtr_read_mbr()

static void rtr_read_mbr ( const byte data,
rtr_mbr_t mbr 
)
inlinestatic

Sets pointer to the data and length in a field.

Parameters
datain: data
mbrout: MBR

◆ rtr_write_mbr()

static void rtr_write_mbr ( byte data,
const rtr_mbr_t mbr 
)
inlinestatic

Sets pointer to the data and length in a field.

Parameters
dataout: data
mbrin: data