From 8e2b4a3399d68f337d2969beca791ffb3dfb3405 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Aug 2006 22:29:35 +0500 Subject: [PATCH] Fix for the failing gis.test mysql-test/r/gis.result: result fixed sql/item_geofunc.cc: new_field->init() call added --- mysql-test/r/gis.result | 2 +- sql/item_geofunc.cc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 76e1bd323ae..6b700d0c947 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -578,7 +578,7 @@ create table t1 select GeomFromWKB(POINT(1,3)); show create table t1; Table Create Table 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 drop table t1; CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo` diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index ee4df8f1cfc..ef71dc9b8b5 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -27,8 +27,11 @@ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg) { - return new Field_geom(max_length, maybe_null, name, t_arg->s, - (Field::geometry_type) get_geometry_type()); + Field *result; + 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()