MySQL 8.0.33
Source Code Documentation
gis0rtree.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2014, 2023, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is also distributed with certain software (including but not
10limited to OpenSSL) that is licensed under separate terms, as designated in a
11particular file or component or in included license documentation. The authors
12of MySQL hereby grant you an additional permission to link the program and
13your derivative works with the separately licensed software that they have
14included with MySQL.
15
16This program is distributed in the hope that it will be useful, but WITHOUT
17ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
19for more details.
20
21You should have received a copy of the GNU General Public License along with
22this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25*****************************************************************************/
26
27/** @file include/gis0rtree.h
28 R-tree header file
29
30 Created 2013/03/27 Jimmy Yang and Allen Lai
31 ***********************************************************************/
32
33#ifndef gis0rtree_h
34#define gis0rtree_h
35
36#include "univ.i"
37
38#include "btr0cur.h"
39#include "btr0types.h"
40#include "data0type.h"
41#include "data0types.h"
42#include "dict0types.h"
43#include "gis0geo.h"
44#include "gis0type.h"
45#include "hash0hash.h"
46#include "mem0mem.h"
47#include "page0page.h"
48#include "que0types.h"
49#include "rem0types.h"
50#include "row0types.h"
51#include "trx0types.h"
52#include "ut0vec.h"
53#include "ut0wqueue.h"
54
55/* Define it for rtree search mode checking. */
58}
59
60/* Geometry data header */
61constexpr uint32_t GEO_DATA_HEADER_SIZE = 4;
62/** Builds a Rtree node pointer out of a physical record and a page number.
63@return own: node pointer
64@param[in] index index
65@param[in] mbr mbr of lower page
66@param[in] rec record for which to build node pointer
67@param[in] page_no page number to put in node pointer
68@param[in] heap memory heap where pointer created */
70 const rtr_mbr_t *mbr, const rec_t *rec,
71 page_no_t page_no, mem_heap_t *heap);
72
73/** Splits an R-tree index page to halves and inserts the tuple. It is assumed
74 that mtr holds an x-latch to the index tree. NOTE: the tree x-latch is
75 released within this function! NOTE that the operation of this
76 function must always succeed, we cannot reverse it: therefore enough
77 free disk space (2 pages) must be guaranteed to be available before
78 this function is called.
79 @return inserted record */
81 uint32_t flags, /*!< in: undo logging and locking flags */
82 btr_cur_t *cursor, /*!< in/out: cursor at which to insert; when the
83 function returns, the cursor is positioned
84 on the predecessor of the inserted record */
85 ulint **offsets, /*!< out: offsets on inserted record */
86 mem_heap_t **heap, /*!< in/out: pointer to memory heap, or NULL */
87 const dtuple_t *tuple, /*!< in: tuple to insert */
88 mtr_t *mtr); /*!< in: mtr */
89
90/** Sets the child node mbr in a node pointer.
91@param[in] index index
92@param[in] block buffer block
93@param[out] mbr MBR encapsulates the page
94@param[in] heap heap for the memory allocation */
95static inline void rtr_page_cal_mbr(const dict_index_t *index,
96 const buf_block_t *block, rtr_mbr_t *mbr,
97 mem_heap_t *heap);
98
99/** Find the next matching record. This function will first exhaust
100the copied record listed in the rtr_info->matches vector before
101moving to next page
102@param[in] tuple Data tuple; NOTE: n_fields_cmp in tuple
103 must be set so that it cannot get compared
104 to the node ptr page number field!
105@param[in] mode Cursor search mode
106@param[in] sel_mode Select mode: SELECT_ORDINARY,
107 SELECT_SKIP_LOKCED, or SELECT_NO_WAIT
108@param[in] cursor Persistent cursor; NOTE that the function
109 may release the page latch
110@param[in] cur_level Current level
111@param[in] mtr Mini-transaction
112@return true if there is next qualified record found, otherwise(if
113exhausted) false */
115 select_mode sel_mode, btr_pcur_t *cursor,
116 ulint cur_level, mtr_t *mtr);
117
118/** Searches the right position in rtree for a page cursor.
119@param[in] block Buffer block
120@param[in] index Index descriptor
121@param[in] tuple Data tuple
122@param[in] mode Page_cur_l, page_cur_le, page_cur_g, or page_cur_ge
123@param[in,out] cursor Page cursor
124@param[in,out] rtr_info Search stack */
125bool rtr_cur_search_with_match(const buf_block_t *block, dict_index_t *index,
126 const dtuple_t *tuple, page_cur_mode_t mode,
127 page_cur_t *cursor, rtr_info_t *rtr_info);
128
129/** Calculate the area increased for a new record
130@return area increased */
132 const dtuple_t *dtuple, /*!< in: data tuple to insert, which
133 cause area increase */
134 const rec_t *rec, /*!< in: physical record which differs from
135 dtuple in some of the common fields, or which
136 has an equal number or more fields than
137 dtuple */
138 const ulint *offsets, /*!< in: array returned by rec_get_offsets() */
139 double *area, /*!< out: increased area */
140 const dd::Spatial_reference_system *srs); /*!< in: SRS of R-tree */
141
142/** Following the right link to find the proper block for insert.
143@return the proper block.
144@param[in] btr_cur btr cursor
145@param[in] mtr mtr */
147
148/** */
150 dict_index_t *index, /*!< in: index */
151 ulint level, /*!< in: the tree level of search */
152 const dtuple_t *tuple, /*!< in: data tuple; NOTE: n_fields_cmp in
153 tuple must be set so that it cannot get
154 compared to the node ptr page number field! */
155 btr_cur_t *sea_cur, /*!< in: search cursor */
156 btr_cur_t *cursor, /*!< in/out: tree cursor; the cursor page is
157 s- or x-latched */
158 page_no_t page_no, /*!< in: current page no */
159 mtr_t *mtr); /*!< in: mtr */
160
161/** Push a nonleaf index node to the search path
162@param[in,out] path search path
163@param[in] pageno pageno to insert
164@param[in] seq_no Node sequence num
165@param[in] level index level
166@param[in] child_no child page no
167@param[in] cursor position cursor
168@param[in] mbr_inc MBR needs to be enlarged */
170 page_no_t pageno, node_seq_t seq_no,
171 ulint level, page_no_t child_no,
172 btr_pcur_t *cursor, double mbr_inc);
173
174/** Push a nonleaf index node to the search path for insertion
175@param[in] index index descriptor
176@param[in,out] path search path
177@param[in] level index level
178@param[in] block block of the page
179@param[in] rec positioned record
180@param[in] mbr_inc MBR needs to be enlarged */
182 ulint level, const buf_block_t *block,
183 const rec_t *rec, double mbr_inc);
184
185/** Allocates a new Split Sequence Number.
186 @return new SSN id */
188 dict_index_t *index); /*!< in: the index struct */
189
190/** Get the current Split Sequence Number.
191 @return current SSN id */
193 dict_index_t *index); /*!< in/out: the index struct */
194
195/** Create a RTree search info structure
196@param[in] need_prdt Whether predicate lock is needed
197@param[in] init_matches Whether to initiate the "matches" structure for
198collecting matched leaf records
199@param[in] cursor Tree search cursor
200@param[in] index Index struct */
201rtr_info_t *rtr_create_rtr_info(bool need_prdt, bool init_matches,
202 btr_cur_t *cursor, dict_index_t *index);
203
204/** Update a btr_cur_t with rtr_info
205@param[in,out] cursor Tree cursor
206@param[in] rtr_info Rtr_info to set to the cursor */
208
209/** Update a btr_cur_t with rtr_info */
211 /****************/
212 rtr_info_t *rtr_info, /*!< in: rtr_info to set to the
213 cursor */
214 bool need_prdt, /*!< in: Whether predicate lock is
215 needed */
216 btr_cur_t *cursor, /*!< in: tree search cursor */
217 dict_index_t *index, /*!< in: index structure */
218 bool reinit); /*!< in: Whether this is a reinit */
219
220/** Clean up Rtree cursor */
221void rtr_clean_rtr_info(rtr_info_t *rtr_info, /*!< in: RTree search info */
222 bool free_all); /*!< in: need to free rtr_info itself */
223
224/** Get the bounding box content from an index record
225@param[in] rec Data tuple
226@param[in] offsets Offsets array
227@param[out] mbr Mbr */
228void rtr_get_mbr_from_rec(const rec_t *rec, const ulint *offsets,
229 rtr_mbr_t *mbr);
230
231/** Get the bounding box content from a MBR data record
232@param[in] dtuple Data tuple
233@param[out] mbr Mbr to fill */
234void rtr_get_mbr_from_tuple(const dtuple_t *dtuple, rtr_mbr *mbr);
235
236/* Get the rtree page father.
237@param[in] offsets work area for the return value
238@param[in] index rtree index
239@param[in] block child page in the index
240@param[in] mtr mtr
241@param[in] sea_cur search cursor, contains information
242 about parent nodes in search
243@param[in] cursor cursor on node pointer record,
244 its page x-latched */
245void rtr_page_get_father(dict_index_t *index, buf_block_t *block, mtr_t *mtr,
246 btr_cur_t *sea_cur, btr_cur_t *cursor);
247
248/** Returns the father block to a page. It is assumed that mtr holds
249 an X or SX latch on the tree.
250 @return rec_get_offsets() of the node pointer record */
252 ulint *offsets, /*!< in: work area for the return value */
253 mem_heap_t *heap, /*!< in: memory heap to use */
254 dict_index_t *index, /*!< in: b-tree index */
255 buf_block_t *block, /*!< in: child page in the index */
256 mtr_t *mtr, /*!< in: mtr */
257 btr_cur_t *sea_cur, /*!< in: search cursor, contains information
258 about parent nodes in search */
259 btr_cur_t *cursor); /*!< out: cursor on node pointer record,
260 its page x-latched */
261/** Store the parent path cursor
262 @return number of cursor stored */
264 const buf_block_t *block, /*!< in: block of the page */
265 btr_cur_t *btr_cur, /*!< in/out: persistent cursor */
266 ulint latch_mode,
267 /*!< in: latch_mode */
268 ulint level, /*!< in: index level */
269 mtr_t *mtr); /*!< in: mtr */
270
271/** Initializes and opens a persistent cursor to an index tree. It should be
272 closed with btr_pcur::close. Mainly called by row_search_index_entry()
273 @param[in] index index
274 @param[in] level level in the btree
275 @param[in] tuple tuple on which search done
276 @param[in] mode PAGE_CUR_L, ...; NOTE that if the search is made using a unique
277 prefix of a record, mode should be PAGE_CUR_LE, not PAGE_CUR_GE, as the latter
278 may end up on the previous page from the record!
279 @param[in] latch_mode BTR_SEARCH_LEAF, ...
280 @param[in] cursor memore buffer for persistent cursor
281 @param[in] location location where called
282 @param[in] mtr mtr */
283void rtr_pcur_open_low(dict_index_t *index, ulint level, const dtuple_t *tuple,
284 page_cur_mode_t mode, ulint latch_mode,
285 btr_pcur_t *cursor, ut::Location location, mtr_t *mtr);
286
287static inline void rtr_pcur_open(dict_index_t *i, const dtuple_t *t,
289 ut::Location loc, mtr_t *m) {
290 rtr_pcur_open_low(i, 0, t, md, l, c, loc, m);
291}
292
293struct btr_cur_t;
294
295/** Returns the R-Tree node stored in the parent search path
296@param[in] btr_cur persistent cursor
297@param[in] level index level of buffer page
298@param[in] is_insert whether insert operation
299@return pointer to R-Tree cursor component */
300static inline node_visit_t *rtr_get_parent_node(btr_cur_t *btr_cur, ulint level,
301 ulint is_insert);
302
303/** Returns the R-Tree cursor stored in the parent search path
304@param[in] btr_cur persistent cursor
305@param[in] level index level of buffer page
306@param[in] is_insert whether insert operation
307@return pointer to R-Tree cursor component */
308static inline btr_pcur_t *rtr_get_parent_cursor(btr_cur_t *btr_cur, ulint level,
309 ulint is_insert);
310
311/** Copy recs from a page to new_block of rtree.
312Differs from page_copy_rec_list_end, because this function does not
313touch the lock table and max trx id on page or compress the page.
314
315IMPORTANT: The caller will have to update IBUF_BITMAP_FREE
316if new_block is a compressed leaf page in a secondary index.
317This has to be done either within the same mini-transaction,
318or by invoking ibuf_reset_free_bits() before mtr_commit().
319
320@param[in] new_block Index page to copy to
321@param[in] block Index page of rec
322@param[in] rec Record on page
323@param[in] index Record descriptor
324@param[in,out] heap Heap memory
325@param[in] rec_move Recording records moved
326@param[in] max_move Num of rec to move
327@param[out] num_moved Num of rec to move
328@param[in] mtr Mini-transaction */
330 buf_block_t *block, rec_t *rec,
332 rtr_rec_move_t *rec_move,
333 ulint max_move, ulint *num_moved,
334 mtr_t *mtr);
335
336/** Copy recs till a specified rec from a page to new_block of rtree.
337@param[in] new_block Index page to copy to
338@param[in] block Index page of rec
339@param[in] rec Record on page
340@param[in] index Record descriptor
341@param[in,out] heap Heap memory
342@param[in] rec_move Recording records moved
343@param[in] max_move Num of rec to move
344@param[out] num_moved Num of rec to move
345@param[in] mtr Mini-transaction */
347 buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index,
348 mem_heap_t *heap, rtr_rec_move_t *rec_move, ulint max_move,
349 ulint *num_moved, mtr_t *mtr);
350
351/** Merge 2 mbrs and update the the mbr that cursor is on.
352@param[in,out] cursor Cursor
353@param[in] cursor2 The other cursor
354@param[in] offsets Rec offsets
355@param[in] offsets2 Rec offsets
356@param[in] child_page The child page.
357@param[in] mtr Mini-transaction */
359 ulint *offsets, ulint *offsets2,
360 page_t *child_page, mtr_t *mtr);
361
362/** Deletes on the upper level the node pointer to a page.
363@param[in] sea_cur Search cursor, contains information about parent nodes in
364search
365@param[in] mtr Mini-transaction
366*/
367void rtr_node_ptr_delete(btr_cur_t *sea_cur, mtr_t *mtr);
368
369/** Check two MBRs are identical or need to be merged
370@param[in] cursor Cursor
371@param[in] cursor2 The other cursor
372@param[in] offsets Rec offsets
373@param[in] offsets2 Rec offsets
374@param[out] new_mbr Mbr to update */
375bool rtr_merge_mbr_changed(btr_cur_t *cursor, btr_cur_t *cursor2,
376 ulint *offsets, ulint *offsets2, rtr_mbr_t *new_mbr);
377
378/** Update the mbr field of a spatial index row.
379 @return true if successful */
381 btr_cur_t *cursor, /*!< in: cursor pointed to rec.*/
382 ulint *offsets, /*!< in: offsets on rec. */
383 btr_cur_t *cursor2, /*!< in/out: cursor pointed to rec
384 that should be deleted.
385 this cursor is for btr_compress to
386 delete the merged page's father rec.*/
387 page_t *child_page, /*!< in: child page. */
388 rtr_mbr_t *new_mbr, /*!< in: the new mbr. */
389 rec_t *new_rec, /*!< in: rec to use */
390 mtr_t *mtr); /*!< in: mtr */
391
392/** Check whether a Rtree page is child of a parent page
393 @return true if there is child/parent relationship */
395 dict_index_t *index, /*!< in: index tree */
396 btr_cur_t *cur, /*!< in/out: position at the parent entry
397 pointing to the child if successful */
398 buf_block_t *parentb, /*!< in: parent page to check */
399 buf_block_t *childb, /*!< in: child Page */
400 mem_heap_t *heap); /*!< in: memory heap */
401
402/** Sets pointer to the data and length in a field.
403@param[out] data data
404@param[in] mbr data */
405static inline void rtr_write_mbr(byte *data, const rtr_mbr_t *mbr);
406
407/** Sets pointer to the data and length in a field.
408@param[in] data data
409@param[out] mbr data */
410static inline void rtr_read_mbr(const byte *data, rtr_mbr_t *mbr);
411
412/** Check whether a discarding page is in anyone's search path
413@param[in] index Index
414@param[in,out] cursor Cursor on the page to discard: not on the root page
415@param[in] block Block of page to be discarded */
417 buf_block_t *block);
418
419/** Reinitialize a RTree search info
420@param[in,out] cursor tree cursor
421@param[in] index index struct
422@param[in] need_prdt Whether predicate lock is needed */
423static inline void rtr_info_reinit_in_cursor(btr_cur_t *cursor,
425 bool need_prdt);
426
427/** Estimates the number of rows in a given area.
428@param[in] index index
429@param[in] tuple range tuple containing mbr, may also be empty tuple
430@param[in] mode search mode
431@return estimated number of rows */
434
435#include "gis0rtree.ic"
436#endif
uint32_t page_no_t
Page number.
Definition: api0api.h:48
The index tree cursor.
The index tree general types.
Definition: spatial_reference_system.h:52
Data types.
Some type definitions.
dberr_t
Definition: db0err.h:38
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:1577
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:1516
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:883
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:287
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:1288
constexpr uint32_t GEO_DATA_HEADER_SIZE
Definition: gis0rtree.h:61
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:1623
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:130
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:247
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:1659
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:1206
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:1592
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:1552
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:56
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:1412
R-tree Inline code.
R-tree header file.
std::vector< node_visit_t, ut::allocator< node_visit_t > > rtr_node_path_t
Definition: gis0type.h:74
uint32_t node_seq_t
Definition: gis0type.h:57
The simple hash table utility.
static int flags[50]
Definition: hp_test1.cc:39
select_mode
Definition: lock0types.h:44
The memory management.
static char * path
Definition: mysqldump.cc:133
bool area(const dd::Spatial_reference_system *srs, const Geometry *g, const char *func_name, double *result, bool *result_null) noexcept
Definition: area.cc:78
mode
Definition: file_handle.h:59
Index page routines.
page_cur_mode_t
Definition: page0types.h:175
@ PAGE_CUR_CONTAIN
Definition: page0types.h:188
@ PAGE_CUR_RTREE_GET_FATHER
Definition: page0types.h:195
byte page_t
Type of the index page.
Definition: page0types.h:151
Query graph global types.
Record manager global types.
byte rec_t
Definition: rem0types.h:40
Row operation global types.
The tree cursor: the definition appears here only for the compiler to know struct size!
Definition: btr0cur.h:667
dict_index_t * index
Index on which the cursor is positioned.
Definition: btr0cur.h:669
Definition: btr0pcur.h:98
The buffer control block structure.
Definition: buf0buf.h:1688
Data structure for an index.
Definition: dict0mem.h:1045
Structure for an SQL data tuple of fields (logical record)
Definition: data0data.h:681
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:301
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:181
Definition: gis0type.h:60
Index page cursor.
Definition: page0cur.h:310
Vectors holding the matching internal pages/nodes and leaf records.
Definition: gis0type.h:108
In memory representation of a minimum bounding rectangle.
Definition: rtree_support.h:39
Definition: gis0type.h:166
Definition: ut0core.h:32
Transaction system global type definitions.
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:405
A vector of pointers to data items.
A work queue.