From 3ccd93c704556d9496b643e580dca8a9fcd2f4d4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2003 15:30:32 +0400 Subject: 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. --- sql/field.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index 37d194ac372..e14fa06f86a 100644 --- a/sql/field.h +++ b/sql/field.h @@ -843,9 +843,10 @@ public: class Field_blob :public Field_str { + bool geom_flag; +protected: uint packlength; String value; // For temporaries - bool geom_flag; public: Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, @@ -855,7 +856,7 @@ public: struct st_table *table_arg, CHARSET_INFO *cs) :Field_str((char*) 0,len_arg, maybe_null_arg ? (uchar*) "": 0,0, NONE, field_name_arg, table_arg, cs), - packlength(3), geom_flag(true) + geom_flag(true), packlength(3) { flags|= BLOB_FLAG; } @@ -940,8 +941,11 @@ public: :Field_blob(len_arg, maybe_null_arg, field_name_arg, table_arg, &my_charset_bin) {} enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY; } - enum_field_types type() const { return FIELD_TYPE_GEOMETRY;} + enum_field_types type() const { return FIELD_TYPE_GEOMETRY; } void sql_type(String &str) const; + int store(const char *to, uint length, CHARSET_INFO *charset); + int store(double nr) { return 1; } + int store(longlong nr) { return 1; } void get_key_image(char *buff,uint length, CHARSET_INFO *cs,imagetype type); void set_key_image(char *buff,uint length, CHARSET_INFO *cs); -- cgit v1.2.1