MySQL 8.3.0
Source Code Documentation
gis0geo.h File Reference

The r-tree define from MyISAM. More...

#include "page0types.h"
#include "sql/gis/rtree_support.h"

Go to the source code of this file.

Classes

struct  rtr_split_node_t
 

Namespaces

namespace  dd
 The version of the current data dictionary table definitions.
 

Functions

static double * reserve_coords (double **d_buffer, int n_dim)
 Inline function for reserving coords. More...
 
int split_rtree_node (rtr_split_node_t *node, int n_entries, int all_size, int key_size, int min_size, int size1, int size2, double **d_buffer, int n_dim, uchar *first_rec, const dd::Spatial_reference_system *srs)
 Split rtree nodes. More...
 
bool rtree_key_cmp (page_cur_mode_t mode, const uchar *a, int a_len, const uchar *b, int b_len, const dd::Spatial_reference_system *srs)
 Compares two keys a and b depending on mode mode can contain these flags: PAGE_CUR_INTERSECT a intersects b PAGE_CUR_CONTAIN a contains b PAGE_CUR_DISJOINT a disjoint b PAGE_CUR_WITHIN a within b PAGE_CUR_MBR_EQUAL All coordinates of MBRs are equal. More...
 

Variables

constexpr uint32_t SPLEN = 8
 

Detailed Description

The r-tree define from MyISAM.

Function Documentation

◆ reserve_coords()

static double * reserve_coords ( double **  d_buffer,
int  n_dim 
)
inlinestatic

Inline function for reserving coords.

Parameters
d_bufferin/out: buffer.
n_dimin: dimensions.

◆ rtree_key_cmp()

bool rtree_key_cmp ( page_cur_mode_t  mode,
const uchar a,
int  a_len,
const uchar b,
int  b_len,
const dd::Spatial_reference_system srs 
)

Compares two keys a and b depending on mode mode can contain these flags: PAGE_CUR_INTERSECT a intersects b PAGE_CUR_CONTAIN a contains b PAGE_CUR_DISJOINT a disjoint b PAGE_CUR_WITHIN a within b PAGE_CUR_MBR_EQUAL All coordinates of MBRs are equal.

Parameters
[in]modecompare method
[in]afirst key
[in]a_lenfirst key len
[in]bsecond key
[in]b_lensecond_key_len
[in]srsSpatial reference system of R-tree
Return values
trueif the predicate is true, otherwise false.

◆ split_rtree_node()

int split_rtree_node ( rtr_split_node_t node,
int  n_entries,
int  all_size,
int  key_size,
int  min_size,
int  size1,
int  size2,
double **  d_buffer,
int  n_dim,
uchar first_rec,
const dd::Spatial_reference_system srs 
)

Split rtree nodes.

Return which group the first rec is in.
in: SRS of R-tree

Split rtree nodes.

Return which group the first rec is in.

Parameters
nodein: split nodes.
n_entriesin: entries number.
all_sizein: total key's size.
key_sizein: key's size.
min_sizein: minimal group size.
size1in: size of group.
size2in: initial group sizes
d_bufferin/out: buffer.
n_dimin: dimensions.
first_recin: the first rec.
srsin: SRS of R-tree

Variable Documentation

◆ SPLEN

constexpr uint32_t SPLEN = 8
constexpr