diff options
author | unknown <ram@mysql.r18.ru> | 2003-03-18 15:30:32 +0400 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-03-18 15:30:32 +0400 |
commit | 3ccd93c704556d9496b643e580dca8a9fcd2f4d4 (patch) | |
tree | 0e83c851e37727716fb38186353324ae67952771 /sql/spatial.cc | |
parent | 1c1f407dd33951d44b4e2eaa30d4025998514e47 (diff) | |
download | mariadb-git-3ccd93c704556d9496b643e580dca8a9fcd2f4d4.tar.gz |
SRID support.
GeomertyFromWKB() function.
SRID() function.
::store() methods for Field_geom.
Code cleanup.
myisam/sp_key.c:
SRID support.
mysql-test/r/gis.result:
We should use GeometryFromWKB().
mysql-test/t/gis.test:
We should use GeometryFromWKB().
sql/field.cc:
SRID support.
::store() methods for Field_geom.
Code cleanup.
sql/field.h:
SRID support.
::store() methods for Field_geom.
Code cleanup.
sql/item_cmpfunc.cc:
SRID support.
Code cleanup.
sql/item_create.cc:
Code cleanup.
sql/item_create.h:
Code cleanup.
sql/item_func.cc:
SRID support.
Code cleanup.
sql/item_func.h:
SRID support.
sql/item_strfunc.cc:
SRID support.
GeometryFromWKB() function.
Code cleanup.
sql/item_strfunc.h:
SRID support.
GeometryFromWKB() function.
Code cleanup.
sql/lex.h:
GeometryFromWKB() function.
SRID() function.
sql/spatial.cc:
Code cleanup.
sql/spatial.h:
Code cleanup.
sql/sql_yacc.yy:
Fix for xxxFromText() functions.
GeometryFromWKB() function.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index 3345c2756e7..df28733782f 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -78,17 +78,17 @@ int Geometry::create_from_wkb(const char *data, uint32 data_len) { uint32 geom_type; - if (data_len < 1+4) + if (data_len < 1 + 4) return 1; - data += sizeof(char); - + data++; //FIXME: check byte ordering - geom_type = uint4korr(data); - data += 4; - m_vmt = find_class(geom_type); - if (!m_vmt) return -1; - m_data = data; - m_data_end = data + data_len; + geom_type= uint4korr(data); + data+= 4; + m_vmt= find_class(geom_type); + if (!m_vmt) + return -1; + m_data= data; + m_data_end= data + data_len; return 0; } |