diff options
author | hf@deer.(none) <> | 2005-10-31 12:24:43 +0400 |
---|---|---|
committer | hf@deer.(none) <> | 2005-10-31 12:24:43 +0400 |
commit | 5150bd8f9f96377edb8658a3d19de1f5a91324ac (patch) | |
tree | e5614d0bc5615eb0512a2ba88e387bac51d56f60 /sql/field.cc | |
parent | b919b29da6755b9d3b8e98600287315a806964c8 (diff) | |
parent | 16c66d49cacfde7e8b5831e54c5c11ec3dfa9554 (diff) | |
download | mariadb-git-5150bd8f9f96377edb8658a3d19de1f5a91324ac.tar.gz |
Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.12839
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/field.cc b/sql/field.cc index 35dfa4cac18..abb5297f458 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5745,8 +5745,7 @@ void Field_blob::get_key_image(char *buff,uint length, return; } get_ptr(&blob); - gobj= Geometry::create_from_wkb(&buffer, - blob + SRID_SIZE, blob_length - SRID_SIZE); + gobj= Geometry::construct(&buffer, blob, blob_length); if (gobj->get_mbr(&mbr, &dummy)) bzero(buff, SIZEOF_STORED_DOUBLE*4); else @@ -6039,8 +6038,7 @@ void Field_geom::get_key_image(char *buff, uint length, CHARSET_INFO *cs, return; } get_ptr(&blob); - gobj= Geometry::create_from_wkb(&buffer, - blob + SRID_SIZE, blob_length - SRID_SIZE); + gobj= Geometry::construct(&buffer, blob, blob_length); if (gobj->get_mbr(&mbr, &dummy)) bzero(buff, SIZEOF_STORED_DOUBLE*4); else @@ -6100,7 +6098,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs) uint32 wkb_type; if (length < SRID_SIZE + WKB_HEADER_SIZE + SIZEOF_STORED_DOUBLE*2) goto err; - wkb_type= uint4korr(from + WKB_HEADER_SIZE); + wkb_type= uint4korr(from + SRID_SIZE + 1); if (wkb_type < (uint32) Geometry::wkb_point || wkb_type > (uint32) Geometry::wkb_end) return -1; |