summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-06-14 16:41:10 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-06-14 16:41:10 +0500
commit6f168d12559d14b10fc3b9df7fec403af39bbc5a (patch)
tree6a54e529a87637aaecb9e9ea0eaa44a985ecf02c /sql/item.cc
parentd37e1642f2e3c235f72a4deac8fdbf6ed31afbfb (diff)
parentc0ebdff9c76c2b3e09bf5e44c22e68a35ef1affc (diff)
downloadmariadb-git-6f168d12559d14b10fc3b9df7fec403af39bbc5a.tar.gz
Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/d2/hf/mrg/mysql-5.0-opt client/mysqltest.c: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/innodb_mysql.result: merging mysql-test/t/innodb_mysql.test: merging sql/sql_select.cc: merging
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index a5dfa0db6b6..32c43eaa865 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4318,7 +4318,9 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table)
case MYSQL_TYPE_GEOMETRY:
return new Field_geom(max_length, maybe_null, name, table,
(Field::geometry_type)
- ((Item_geometry_func *)this)->get_geometry_type());
+ ((type() == Item::TYPE_HOLDER) ?
+ ((Item_type_holder *)this)->get_geometry_type() :
+ ((Item_geometry_func *)this)->get_geometry_type()));
}
}
@@ -6423,6 +6425,10 @@ Item_type_holder::Item_type_holder(THD *thd, Item *item)
if (Field::result_merge_type(fld_type) == INT_RESULT)
decimals= 0;
prev_decimal_int_part= item->decimal_int_part();
+ if (item->field_type() == MYSQL_TYPE_GEOMETRY)
+ geometry_type= (item->type() == Item::FIELD_ITEM) ?
+ ((Item_field *)item)->get_geometry_type() :
+ (Field::geometry_type)((Item_geometry_func *)item)->get_geometry_type();
}