summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorAlexander Barkov <alexander.barkov@oracle.com>2012-08-17 13:18:56 +0400
committerAlexander Barkov <alexander.barkov@oracle.com>2012-08-17 13:18:56 +0400
commit444a081c83cb1b8739cd2a4009ec5c8e013677e8 (patch)
tree23d9976798eb47ee551654c9a34a00b01dafad3c /sql/spatial.h
parentbd6dbf21bbf879c79c576767febc69e53b754a2e (diff)
parent5aec4e2b3bbcaea33d719e2e4e94665c4856e413 (diff)
downloadmariadb-git-444a081c83cb1b8739cd2a4009ec5c8e013677e8.tar.gz
Merging from 5.5
Diffstat (limited to 'sql/spatial.h')
-rw-r--r--sql/spatial.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/spatial.h b/sql/spatial.h
index e93540db862..1e2decd6ef3 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -383,6 +383,10 @@ public:
class Gis_line_string: public Geometry
{
+ // Maximum number of points in LineString that can fit into String
+ static const uint32 max_n_points=
+ (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
+ POINT_DATA_SIZE;
public:
Gis_line_string() {} /* Remove gcc warning */
virtual ~Gis_line_string() {} /* Remove gcc warning */
@@ -439,6 +443,10 @@ public:
class Gis_multi_point: public Geometry
{
+ // Maximum number of points in MultiPoint that can fit into String
+ static const uint32 max_n_points=
+ (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
+ (WKB_HEADER_SIZE + POINT_DATA_SIZE);
public:
Gis_multi_point() {} /* Remove gcc warning */
virtual ~Gis_multi_point() {} /* Remove gcc warning */