summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <georgi.kodinov@oracle.com>2013-03-28 17:41:22 +0200
committerGeorgi Kodinov <georgi.kodinov@oracle.com>2013-03-28 17:41:22 +0200
commit00ee67dece60e5a14b5907383aa63b49f6c48b33 (patch)
tree41bf66bded0bebcd5d5eee44b50b34fe9fad0183 /sql/spatial.h
parent62db338024677b0af084c127e8f2c6a84114bc8c (diff)
parente927bda69f5213725c95615641db1bf511a9fcab (diff)
downloadmariadb-git-00ee67dece60e5a14b5907383aa63b49f6c48b33.tar.gz
merge
Diffstat (limited to 'sql/spatial.h')
-rw-r--r--sql/spatial.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/spatial.h b/sql/spatial.h
index 557bf6f4a5c..37c684f705e 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -339,14 +339,17 @@ protected:
Need to perform the calculation in logical units, since multiplication
can overflow the size data type.
- @arg data pointer to the begining of the points array
- @arg expected_points number of points expected
+ @arg data pointer to the begining of the points array
+ @arg expected_points number of points expected
+ @arg extra_point_space extra space for each point element in the array
@return true if there are not enough points
*/
- inline bool not_enough_points(const char *data, uint32 expected_points) const
+ inline bool not_enough_points(const char *data, uint32 expected_points,
+ uint32 extra_point_space = 0) const
{
return (m_data_end < data ||
- (expected_points > ((m_data_end - data) / POINT_DATA_SIZE)));
+ (expected_points > ((m_data_end - data) /
+ (POINT_DATA_SIZE + extra_point_space))));
}
const char *m_data;
const char *m_data_end;