summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <dkatz@damien-katzs-computer.local>2007-10-08 13:15:02 -0400
committerunknown <dkatz@damien-katzs-computer.local>2007-10-08 13:15:02 -0400
commitdd3e741a6184a4afbcbc1dabe5364bf349181a52 (patch)
tree3bcf3c8816dcdb1413db33c35c83763d7f924f85 /sql/item.cc
parentded7fe7fd16d35b0a63a7a417b67fdd31df5033d (diff)
parent45b1a1c37b31b131ff2c54bcbd6aaa839ef88e56 (diff)
downloadmariadb-git-dd3e741a6184a4afbcbc1dabe5364bf349181a52.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime sql/item.cc: Auto merged sql/set_var.cc: Auto merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index d8080d62c39..a498a681fc4 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4456,12 +4456,14 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
else
field= new Field_blob(max_length, maybe_null, name, collation.collation);
break; // Blob handled outside of case
+#ifdef HAVE_SPATIAL
case MYSQL_TYPE_GEOMETRY:
field= new Field_geom(max_length, maybe_null, name, table->s,
(Field::geometry_type)
((type() == Item::TYPE_HOLDER) ?
((Item_type_holder *)this)->get_geometry_type() :
((Item_geometry_func *)this)->get_geometry_type()));
+#endif /* HAVE_SPATIAL */
}
if (field)
field->init(table);
@@ -6585,10 +6587,12 @@ 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();
+#ifdef HAVE_SPATIAL
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();
+#endif /* HAVE_SPATIAL */
}