Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-04 16:00:24+03:00, gkodinov@stripped +3 -0
Bug #21104: R-Tree Index Incorrectly Optimized When Table Has One Row
Consider the points that lay on the Minimum Bounding Rectangle as inner
points to that rectange, e.g.:
(2 1) is inner to (1 1, 1 3, 3 3, 3 1, 1 1)
mysql-test/r/gis.result@stripped, 2006-09-04 16:00:17+03:00, gkodinov@stripped +5 -0
Bug #21104: R-Tree Index Incorrectly Optimized When Table Has One Row
- test case
mysql-test/t/gis.test@stripped, 2006-09-04 16:00:17+03:00, gkodinov@stripped +6 -0
Bug #21104: R-Tree Index Incorrectly Optimized When Table Has One Row
- test case
sql/spatial.h@stripped, 2006-09-04 16:00:18+03:00, gkodinov@stripped +1 -1
Bug #21104: R-Tree Index Incorrectly Optimized When Table Has One Row
- consider points that lay on the Minimum Bounding Rectangle as
inner points to that rectangle.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gkodinov
# Host: macbook.gmz
# Root: /Users/kgeorge/mysql/work/B21104-5.0-opt
--- 1.20/sql/spatial.h 2006-09-04 16:00:40 +03:00
+++ 1.21/sql/spatial.h 2006-09-04 16:00:40 +03:00
@@ -142,7 +142,7 @@ struct MBR
bool inner_point(double x, double y) const
{
/* The following should be safe, even if we compare doubles */
- return (xmin<x) && (xmax>x) && (ymin<y) && (ymax>y);
+ return (xmin <= x) && (x <= xmax) && (ymin <= y) && (y <= ymax);
}
int overlaps(const MBR *mbr)
--- 1.35/mysql-test/r/gis.result 2006-09-04 16:00:40 +03:00
+++ 1.36/mysql-test/r/gis.result 2006-09-04 16:00:40 +03:00
@@ -711,3 +711,8 @@ desc t1;
Field Type Null Key Default Extra
GeomFromText('point(1 1)') geometry NO
drop table t1;
+select MBROverlaps(GeomFromText('Polygon((0 2, 2 2, 2 3, 0 3, 0 2))'),
+GeomFromText('Polygon((0 1, 1 1, 1 4, 0 4, 0 1))'));
+MBROverlaps(GeomFromText('Polygon((0 2, 2 2, 2 3, 0 3, 0 2))'),
+GeomFromText('Polygon((0 1, 1 1, 1 4, 0 4, 0 1))'))
+1
--- 1.29/mysql-test/t/gis.test 2006-09-04 16:00:40 +03:00
+++ 1.30/mysql-test/t/gis.test 2006-09-04 16:00:40 +03:00
@@ -422,3 +422,9 @@ create table t1 select GeomFromText('poi
desc t1;
drop table t1;
+#
+# Bug #21104: R-Tree Index Incorrectly Optimized When Table Has One Row
+#
+
+select MBROverlaps(GeomFromText('Polygon((0 2, 2 2, 2 3, 0 3, 0 2))'),
+ GeomFromText('Polygon((0 1, 1 1, 1 4, 0 4, 0 1))'));
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2255) BUG#21104 | kgeorge | 4 Sep |