1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34138: Implements the function MBRCoveredBy

Returns 1 or 0 to indicate whether the minimum bounding rectangle of g1
is covered by the minimum bounding rectangle of g2. The tests have been
cherry-picked from the MySQL implementation of this function to grant
compatibility among the two implementations.

Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com>
Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Co-authored-by: Martin Hansson  <martin.hansson@oracle.com>
Co-authored-by: Erik Froseth <erik.froseth@oracle.com>
Co-authored-by: Hans H Melby <hans.h.melby@oracle.com>
Co-authored-by: Jens Even Berg Blomsøy <jens.even.blomosoy@oracle.com>
Co-authored-by: David Zhao <david.zhao@oracle.com>
Co-authored-by: BennyWang <benny.wang@oracle.com>
This commit is contained in:
StefanoPetrilli
2024-06-25 22:28:57 +02:00
committed by Dave Gosselin
parent 47ed8c0416
commit 1401d2fcd0
7 changed files with 2220 additions and 4 deletions

View File

@@ -25,7 +25,7 @@
double my_double_round(double value, longlong dec, bool dec_unsigned,
bool truncate);
/*
/*
exponential notation :
1 sign
1 number before the decimal point
@@ -140,6 +140,21 @@ int MBR::within(const MBR *mbr)
}
int MBR::coveredby(const MBR *mbr)
{
int dim1= dimension();
int dim2= mbr->dimension();
if (dim1 > dim2)
return 0;
else if (dim1 == 0 && dim2 == 0)
return equals(mbr);
return ((xmin >= mbr->xmin) && (xmax <= mbr->xmax) &&
(ymin >= mbr->ymin) && (ymax <= mbr->ymax));
}
/***************************** Gis_class_info *******************************/
Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_last+1]=