summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
authorunknown <holyfoot@deer.(none)>2006-07-04 12:56:53 +0500
committerunknown <holyfoot@deer.(none)>2006-07-04 12:56:53 +0500
commit8e1162f830c3b7a19e8632ffc7e1a94a84e171c5 (patch)
tree9f696d4b513142b433b7757c911ed0f39bc54678 /sql/item_geofunc.h
parent8703b22e167c706d5a8c77a1e24948b4db3fafb3 (diff)
downloadmariadb-git-8e1162f830c3b7a19e8632ffc7e1a94a84e171c5.tar.gz
bug #14807 (GeomFromText() should return MYSQL_TYPE_GEOMETRY)
we didn't have code creating GEOMETRY-type fields from Items (expression results) So i added this code mysql-test/r/gis.result: test result fixed mysql-test/t/gis.test: testcase added sql/item_geofunc.cc: Item_geometry_func::tmp_table_field implemented sql/item_geofunc.h: tmp_table_field() and get_geometry_type() declared
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r--sql/item_geofunc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 1f64fdba609..4848f59301d 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -33,6 +33,8 @@ public:
Item_geometry_func(List<Item> &list) :Item_str_func(list) {}
void fix_length_and_dec();
enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; }
+ Field *tmp_table_field(TABLE *t_arg);
+ virtual int get_geometry_type() const;
};
class Item_func_geometry_from_text: public Item_geometry_func
@@ -89,6 +91,7 @@ public:
Item_func_centroid(Item *a): Item_geometry_func(a) {}
const char *func_name() const { return "centroid"; }
String *val_str(String *);
+ int get_geometry_type() const;
};
class Item_func_envelope: public Item_geometry_func
@@ -97,6 +100,7 @@ public:
Item_func_envelope(Item *a): Item_geometry_func(a) {}
const char *func_name() const { return "envelope"; }
String *val_str(String *);
+ int get_geometry_type() const;
};
class Item_func_point: public Item_geometry_func
@@ -106,6 +110,7 @@ public:
Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {}
const char *func_name() const { return "point"; }
String *val_str(String *);
+ int get_geometry_type() const;
};
class Item_func_spatial_decomp: public Item_geometry_func