summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
committerSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
commit6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d (patch)
tree5a7e05e0a9abb5f5cc2672bc3d545ac3f5f7fa43 /sql/spatial.h
parent102a7a2a763dc5f2da8dd1f9ca9a53664c5aad6a (diff)
parente308d7417bc4ceb1b3b72cac2642015b88f310ff (diff)
downloadmariadb-git-6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d.tar.gz
5.3 merge
Diffstat (limited to 'sql/spatial.h')
-rw-r--r--sql/spatial.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/spatial.h b/sql/spatial.h
index f55d1ccba8e..9aaedfe8a20 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -200,6 +200,9 @@ struct MBR
return (d == intersection.dimension());
}
+
+ int valid() const
+ { return xmin <= xmax && ymin <= ymax; }
};
@@ -212,7 +215,7 @@ class Geometry
public:
// Maximum number of points in feature that can fit into String
static const uint32 max_n_points=
- (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
+ (uint32) (INT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
POINT_DATA_SIZE;
Geometry() {} /* Remove gcc warning */