summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-09-22 22:36:53 +0500
committerunknown <hf@deer.(none)>2004-09-22 22:36:53 +0500
commit126ea49d08dda845740c2f9c93531b69bc707873 (patch)
treeaa41988964c204abc8e7cd531addfd35f09a1f7d /sql/item_geofunc.cc
parent871c5c0175cc579f355202464f9f858b473a9357 (diff)
downloadmariadb-git-126ea49d08dda845740c2f9c93531b69bc707873.tar.gz
Additional fix for bug #5136 (Geometry object is corrupted when queried)
CREATE TABLE t1 SELECT POINT(1,2); fixed mysql-test/r/gis.result: Appropriate test result mysql-test/t/gis.test: test case sql/item_geofunc.cc: Item_geometry_func::fix_lengths_and_dec implementation several fix_length_and_dec's not needed now sql/item_geofunc.h: Item_geometry_func class presented
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);