summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2012-11-06 11:52:55 +0200
committerunknown <timour@askmonty.org>2012-11-06 11:52:55 +0200
commit7c23d6d0c66cb3b84cb466f956e19bfea0acc342 (patch)
tree551dd23a43a26923a6dd30096a2822a27a90f355 /sql/spatial.h
parent43293b7a515dbb2cf04907e2d98bcc813279cad8 (diff)
parent813b661d00123e3291530d102e2b94388f42fb0f (diff)
downloadmariadb-git-7c23d6d0c66cb3b84cb466f956e19bfea0acc342.tar.gz
Merge MySQL 5.1.66 -> MariaDB 5.1.65
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 662c377dc1d..20b3856ca9a 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -379,6 +379,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 */
@@ -435,6 +439,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 */