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