summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-16 19:09:54 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-16 19:09:54 +0200
commit005c7e54214546584c8dc67a746e215f8dbe4b58 (patch)
treedea50cd7b32808413e058d43d20cf230d1cc7477 /sql/spatial.cc
parentb9f220b45afaae9b61af29129a8c8ec5f9a7759b (diff)
parent4f5c10e6b565bc2761b9d083e25c6a36141552a0 (diff)
downloadmariadb-git-005c7e54214546584c8dc67a746e215f8dbe4b58.tar.gz
mysql-5.5.32 merge
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 2359f4fa271..a01d2c59a49 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2002, 2012, Oracle and/or its affiliates.
- Copyright (c) 2011, 2012, Monty Program Ab
+ Copyright (c) 2002, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2013, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -818,7 +818,6 @@ int Gis_line_string::store_shapes(Gcalc_shape_transporter *trn) const
return trn->complete_line();
}
-
const Geometry::Class_info *Gis_line_string::get_class_info() const
{
return &linestring_class;
@@ -939,7 +938,9 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
if (len < 4)
return 0;
- n_linear_rings= wkb_get_uint(wkb, bo);
+ if (!(n_linear_rings= wkb_get_uint(wkb, bo)))
+ return 0;
+
if (res->reserve(4, 512))
return 0;
wkb+= 4;