139 const ulint *offsets,
184 const rec_t *rec,
double mbr_inc);
uint32_t page_no_t
Page number.
Definition: api0api.h:46
The index tree general types.
Definition: spatial_reference_system.h:53
dberr_t
Definition: db0err.h:39
Data dictionary global types.
The r-tree define from MyISAM.
void rtr_node_ptr_delete(btr_cur_t *sea_cur, mtr_t *mtr)
Deletes on the upper level the node pointer to a page.
Definition: gis0rtree.cc:1578
static void rtr_page_cal_mbr(const dict_index_t *index, const buf_block_t *block, rtr_mbr_t *mbr, mem_heap_t *heap)
Sets the child node mbr in a node pointer.
void rtr_pcur_open_low(dict_index_t *index, ulint level, const dtuple_t *tuple, page_cur_mode_t mode, ulint latch_mode, btr_pcur_t *cursor, ut::Location location, mtr_t *mtr)
Initializes and opens a persistent cursor to an index tree.
Definition: gis0sea.cc:492
static void rtr_write_mbr(byte *data, const rtr_mbr_t *mbr)
Sets pointer to the data and length in a field.
void rtr_page_get_father(dict_index_t *index, buf_block_t *block, mtr_t *mtr, btr_cur_t *sea_cur, btr_cur_t *cursor)
Definition: gis0sea.cc:679
static void rtr_read_mbr(const byte *data, rtr_mbr_t *mbr)
Sets pointer to the data and length in a field.
bool rtr_pcur_move_to_next(const dtuple_t *tuple, page_cur_mode_t mode, select_mode sel_mode, btr_pcur_t *cursor, ulint cur_level, mtr_t *mtr)
Find the next matching record.
Definition: gis0sea.cc:437
void rtr_get_mbr_from_rec(const rec_t *rec, const ulint *offsets, rtr_mbr_t *mbr)
Get the bounding box content from an index record.
Definition: gis0sea.cc:1451
ulint rtr_store_parent_path(const buf_block_t *block, btr_cur_t *btr_cur, ulint latch_mode, ulint level, mtr_t *mtr)
Store the parent path cursor.
Definition: gis0sea.cc:1310
static btr_pcur_t * rtr_get_parent_cursor(btr_cur_t *btr_cur, ulint level, ulint is_insert)
Returns the R-Tree cursor stored in the parent search path.
static void rtr_info_reinit_in_cursor(btr_cur_t *cursor, dict_index_t *index, bool need_prdt)
Reinitialize a RTree search info.
bool rtr_merge_mbr_changed(btr_cur_t *cursor, btr_cur_t *cursor2, ulint *offsets, ulint *offsets2, rtr_mbr_t *new_mbr)
Check two MBRs are identical or need to be merged.
Definition: gis0rtree.cc:1517
static node_seq_t rtr_get_current_ssn_id(dict_index_t *index)
Get the current Split Sequence Number.
rtr_info_t * rtr_create_rtr_info(bool need_prdt, bool init_matches, btr_cur_t *cursor, dict_index_t *index)
Create a RTree search info structure.
Definition: gis0sea.cc:827
rec_t * rtr_page_split_and_insert(uint32_t flags, btr_cur_t *cursor, ulint **offsets, mem_heap_t **heap, const dtuple_t *tuple, mtr_t *mtr)
Splits an R-tree index page to halves and inserts the tuple.
Definition: gis0rtree.cc:884
static node_seq_t rtr_get_new_ssn_id(dict_index_t *index)
Allocates a new Split Sequence Number.
static void rtr_pcur_open(dict_index_t *i, const dtuple_t *t, page_cur_mode_t md, ulint l, btr_pcur_t *c, ut::Location loc, mtr_t *m)
Definition: gis0rtree.h:288
void rtr_page_copy_rec_list_end_no_locks(buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index, mem_heap_t *heap, rtr_rec_move_t *rec_move, ulint max_move, ulint *num_moved, mtr_t *mtr)
Copy recs from a page to new_block of rtree.
Definition: gis0rtree.cc:1289
constexpr uint32_t GEO_DATA_HEADER_SIZE
Definition: gis0rtree.h:62
double rtr_rec_cal_increase(const dtuple_t *dtuple, const rec_t *rec, const ulint *offsets, double *area, const dd::Spatial_reference_system *srs)
Calculate the area increased for a new record.
Definition: gis0rtree.cc:1624
void rtr_info_update_btr(btr_cur_t *cursor, rtr_info_t *rtr_info)
Update a btr_cur_t with rtr_info.
Definition: gis0sea.cc:873
static node_visit_t * rtr_get_parent_node(btr_cur_t *btr_cur, ulint level, ulint is_insert)
Returns the R-Tree node stored in the parent search path.
dtuple_t * rtr_index_build_node_ptr(const dict_index_t *index, const rtr_mbr_t *mbr, const rec_t *rec, page_no_t page_no, mem_heap_t *heap)
Builds a Rtree node pointer out of a physical record and a page number.
Definition: gis0rtree.cc:131
bool rtr_cur_search_with_match(const buf_block_t *block, dict_index_t *index, const dtuple_t *tuple, page_cur_mode_t mode, page_cur_t *cursor, rtr_info_t *rtr_info)
Searches the right position in rtree for a page cursor.
Definition: gis0sea.cc:1485
void rtr_init_rtr_info(rtr_info_t *rtr_info, bool need_prdt, btr_cur_t *cursor, dict_index_t *index, bool reinit)
Update a btr_cur_t with rtr_info.
Definition: gis0sea.cc:880
bool rtr_update_mbr_field(btr_cur_t *cursor, ulint *offsets, btr_cur_t *cursor2, page_t *child_page, rtr_mbr_t *new_mbr, rec_t *new_rec, mtr_t *mtr)
Update the mbr field of a spatial index row.
Definition: gis0rtree.cc:248
void rtr_check_discard_page(dict_index_t *index, btr_cur_t *cursor, buf_block_t *block)
Check whether a discarding page is in anyone's search path.
Definition: gis0sea.cc:1072
int64_t rtr_estimate_n_rows_in_range(dict_index_t *index, const dtuple_t *tuple, page_cur_mode_t mode)
Estimates the number of rows in a given area.
Definition: gis0rtree.cc:1660
dberr_t rtr_ins_enlarge_mbr(btr_cur_t *btr_cur, mtr_t *mtr)
Following the right link to find the proper block for insert.
Definition: gis0rtree.cc:1207
bool rtr_check_same_block(dict_index_t *index, btr_cur_t *cur, buf_block_t *parentb, buf_block_t *childb, mem_heap_t *heap)
Check whether a Rtree page is child of a parent page.
Definition: gis0rtree.cc:1593
dberr_t rtr_merge_and_update_mbr(btr_cur_t *cursor, btr_cur_t *cursor2, ulint *offsets, ulint *offsets2, page_t *child_page, mtr_t *mtr)
Merge 2 mbrs and update the the mbr that cursor is on.
Definition: gis0rtree.cc:1553
void rtr_get_mbr_from_tuple(const dtuple_t *dtuple, rtr_mbr *mbr)
Get the bounding box content from a MBR data record.
Definition: gis0sea.cc:1462
static bool RTREE_SEARCH_MODE(page_cur_mode_t mode)
Definition: gis0rtree.h:57
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.
ulint * rtr_page_get_father_block(ulint *offsets, mem_heap_t *heap, dict_index_t *index, buf_block_t *block, mtr_t *mtr, btr_cur_t *sea_cur, btr_cur_t *cursor)
Returns the father block to a page.
Definition: gis0sea.cc:701
void rtr_clean_rtr_info(rtr_info_t *rtr_info, bool free_all)
Clean up Rtree cursor.
Definition: gis0sea.cc:935
void rtr_non_leaf_insert_stack_push(dict_index_t *index, rtr_node_path_t *path, ulint level, const buf_block_t *block, const rec_t *rec, double mbr_inc)
Push a nonleaf index node to the search path for insertion.
void rtr_get_father_node(dict_index_t *index, ulint level, const dtuple_t *tuple, btr_cur_t *sea_cur, btr_cur_t *cursor, page_no_t page_no, mtr_t *mtr)
in: mtr
Definition: gis0sea.cc:721
void rtr_page_copy_rec_list_start_no_locks(buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index, mem_heap_t *heap, rtr_rec_move_t *rec_move, ulint max_move, ulint *num_moved, mtr_t *mtr)
Copy recs till a specified rec from a page to new_block of rtree.
Definition: gis0rtree.cc:1413
std::vector< node_visit_t, ut::allocator< node_visit_t > > rtr_node_path_t
Definition: gis0type.h:75
uint32_t node_seq_t
Definition: gis0type.h:58
The simple hash table utility.
static int flags[50]
Definition: hp_test1.cc:40
select_mode
Definition: lock0types.h:47
static char * path
Definition: mysqldump.cc:149
bool area(const dd::Spatial_reference_system *srs, const Geometry *g, const char *func_name, double *result, bool *result_null) noexcept
Definition: area.cc:79
mode
Definition: file_handle.h:61
page_cur_mode_t
Definition: page0types.h:176
@ PAGE_CUR_CONTAIN
Definition: page0types.h:189
@ PAGE_CUR_RTREE_GET_FATHER
Definition: page0types.h:196
byte page_t
Type of the index page.
Definition: page0types.h:152
Query graph global types.
Record manager global types.
byte rec_t
Definition: rem0types.h:41
Row operation global types.
The tree cursor: the definition appears here only for the compiler to know struct size!
Definition: btr0cur.h:668
dict_index_t * index
Index on which the cursor is positioned.
Definition: btr0cur.h:670
Definition: btr0pcur.h:99
The buffer control block structure.
Definition: buf0buf.h:1747
Data structure for an index.
Definition: dict0mem.h:1041
Structure for an SQL data tuple of fields (logical record)
Definition: data0data.h:696
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
Definition: gis0type.h:61
Index page cursor.
Definition: page0cur.h:311
Vectors holding the matching internal pages/nodes and leaf records.
Definition: gis0type.h:109
In memory representation of a minimum bounding rectangle.
Definition: rtree_support.h:40
Definition: gis0type.h:167
Transaction system global type definitions.
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
A vector of pointers to data items.