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.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index ea891a457ec..2d715dc8765 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -1,7 +1,7 @@
#ifndef ITEM_GEOFUNC_INCLUDED
#define ITEM_GEOFUNC_INCLUDED
-/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2010 Oracle and/or its affiliates.
Copyright (C) 2011 Monty Program Ab.
This program is free software; you can redistribute it and/or modify
@@ -61,12 +61,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 "st_astext"; }
- String *val_str(String *);
+ String *val_str_ascii(String *);
void fix_length_and_dec();
};
@@ -79,16 +79,16 @@ 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 "st_geometrytype"; }
void fix_length_and_dec()
{
// "GeometryCollection" is the longest
- max_length= 20;
+ fix_length_and_charset(20, default_charset());
maybe_null= 1;
};
};
@@ -503,5 +503,4 @@ public:
#define GEOM_NEW(thd, obj_constructor) NULL
#endif /*HAVE_SPATIAL*/
-#endif /*ITEM_GEOFUNC_INCLUDED*/
-
+#endif /* ITEM_GEOFUNC_INCLUDED */