summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
commit182599dd13f280ce4d51333bca98dbd5e4816bba (patch)
treec02d7fe89f0e9d9cbd05e83dd77ceeed812eb293 /sql/spatial.cc
parent774194634297aebf6ecbbda7c5601c796f43e5fc (diff)
parent9a5fa17fd3c4885262e31bf14cf495d02e5f6b27 (diff)
downloadmariadb-git-182599dd13f280ce4d51333bca98dbd5e4816bba.tar.gz
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index f96196cb836..f1dd0e6cebd 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -142,11 +142,10 @@ Geometry *Geometry::construct(Geometry_buffer *buffer,
{
uint32 geom_type;
Geometry *result;
- char byte_order;
if (data_len < SRID_SIZE + WKB_HEADER_SIZE) // < 4 + (1 + 4)
return NULL;
- byte_order= data[SRID_SIZE];
+ /* + 1 to skip the byte order (stored in position SRID_SIZE). */
geom_type= uint4korr(data + SRID_SIZE + 1);
if (!(result= create_by_typeid(buffer, (int) geom_type)))
return NULL;