diff options
author | Georgi Kodinov <georgi.kodinov@oracle.com> | 2013-03-28 17:41:22 +0200 |
---|---|---|
committer | Georgi Kodinov <georgi.kodinov@oracle.com> | 2013-03-28 17:41:22 +0200 |
commit | 7c2a140911a4b76d302be43c9f41a85fdc66bf4b (patch) | |
tree | 41bf66bded0bebcd5d5eee44b50b34fe9fad0183 /sql/spatial.h | |
parent | 65b3449391c9500320e8edd9d2bd6addeca32964 (diff) | |
parent | 2739ee3848341c1feeae62bdc663506906ef7f33 (diff) | |
download | mariadb-git-7c2a140911a4b76d302be43c9f41a85fdc66bf4b.tar.gz |
merge
Diffstat (limited to 'sql/spatial.h')
-rw-r--r-- | sql/spatial.h | 11 |
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; |