summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-09-22 22:36:53 +0500
committerhf@deer.(none) <>2004-09-22 22:36:53 +0500
commitd8c626eb53fa538365b8ddb6bebd0ee00390fdf3 (patch)
treeaa41988964c204abc8e7cd531addfd35f09a1f7d /sql/item_geofunc.cc
parentb40ca996681155305ec0dcc708cce023e5a4ca9e (diff)
downloadmariadb-git-d8c626eb53fa538365b8ddb6bebd0ee00390fdf3.tar.gz
Additional fix for bug #5136 (Geometry object is corrupted when queried)
CREATE TABLE t1 SELECT POINT(1,2); fixed
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc25
1 files changed, 7 insertions, 18 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 790fdcd5cd1..935925c1e83 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -27,6 +27,13 @@
#include "sql_acl.h"
#include <m_ctype.h>
+void Item_geometry_func::fix_length_and_dec()
+{
+ collation.set(&my_charset_bin);
+ decimals=0;
+ max_length=MAX_BLOB_WIDTH;
+}
+
String *Item_func_geometry_from_text::val_str(String *str)
{
@@ -55,12 +62,6 @@ String *Item_func_geometry_from_text::val_str(String *str)
}
-void Item_func_geometry_from_text::fix_length_and_dec()
-{
- max_length=MAX_BLOB_WIDTH;
-}
-
-
String *Item_func_geometry_from_wkb::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
@@ -86,12 +87,6 @@ String *Item_func_geometry_from_wkb::val_str(String *str)
}
-void Item_func_geometry_from_wkb::fix_length_and_dec()
-{
- max_length=MAX_BLOB_WIDTH;
-}
-
-
String *Item_func_as_wkt::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
@@ -140,12 +135,6 @@ String *Item_func_as_wkb::val_str(String *str)
}
-void Item_func_as_wkb::fix_length_and_dec()
-{
- max_length= MAX_BLOB_WIDTH;
-}
-
-
String *Item_func_geometry_type::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);