summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_geofunc.h')
-rw-r--r--sql/item_geofunc.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 0a6e8d03a46..c5c1eae2d39 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -1,4 +1,7 @@
-/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+#ifndef ITEM_GEOFUNC_INCLUDED
+#define ITEM_GEOFUNC_INCLUDED
+
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,12 +57,12 @@ public:
String *val_str(String *);
};
-class Item_func_as_wkt: public Item_str_func
+class Item_func_as_wkt: public Item_str_ascii_func
{
public:
- Item_func_as_wkt(Item *a): Item_str_func(a) {}
+ Item_func_as_wkt(Item *a): Item_str_ascii_func(a) {}
const char *func_name() const { return "astext"; }
- String *val_str(String *);
+ String *val_str_ascii(String *);
void fix_length_and_dec();
};
@@ -72,16 +75,17 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
};
-class Item_func_geometry_type: public Item_str_func
+class Item_func_geometry_type: public Item_str_ascii_func
{
public:
- Item_func_geometry_type(Item *a): Item_str_func(a) {}
- String *val_str(String *);
+ Item_func_geometry_type(Item *a): Item_str_ascii_func(a) {}
+ String *val_str_ascii(String *);
const char *func_name() const { return "geometrytype"; }
void fix_length_and_dec()
{
- max_length=20; // "GeometryCollection" is the most long
- maybe_null= 1;
+ // "GeometryCollection" is the longest
+ fix_length_and_charset(20, default_charset());
+ maybe_null= 1;
};
};
@@ -402,3 +406,4 @@ public:
#endif
+#endif /* ITEM_GEOFUNC_INCLUDED */