Commit 8e2b4a33 authored by unknown's avatar unknown

Fix for the failing gis.test


mysql-test/r/gis.result:
  result fixed
sql/item_geofunc.cc:
  new_field->init() call added
parent 655d344b
...@@ -578,7 +578,7 @@ create table t1 select GeomFromWKB(POINT(1,3)); ...@@ -578,7 +578,7 @@ create table t1 select GeomFromWKB(POINT(1,3));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`GeomFromWKB(POINT(1,3))` geometry NOT NULL default '' `GeomFromWKB(POINT(1,3))` geometry NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo` CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo`
......
...@@ -27,8 +27,11 @@ ...@@ -27,8 +27,11 @@
Field *Item_geometry_func::tmp_table_field(TABLE *t_arg) Field *Item_geometry_func::tmp_table_field(TABLE *t_arg)
{ {
return new Field_geom(max_length, maybe_null, name, t_arg->s, Field *result;
(Field::geometry_type) get_geometry_type()); if ((result= new Field_geom(max_length, maybe_null, name, t_arg->s,
(Field::geometry_type) get_geometry_type())))
result->init(t_arg);
return result;
} }
void Item_geometry_func::fix_length_and_dec() void Item_geometry_func::fix_length_and_dec()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment