Bug #35004 compiling failed after "configure --without-geometry"
Submitted: 3 Mar 2008 16:14 Modified: 3 Mar 2008 19:54
Reporter: Roman Laptev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.x OS:Any (Unix/Linux)
Assigned to: CPU Architecture:Any
Tags: make, without-geometry

[3 Mar 2008 16:14] Roman Laptev
Description:
make failed with error:

item.cc: In member function ‘Field* Item::tmp_table_field_from_field_type(TABLE*)’:
item.cc:4367: error: expected type-specifier before ‘Field_geom’
item.cc:4367: error: cannot convert ‘int*’ to ‘Field*’ in return
item.cc:4367: error: expected ‘;’ before ‘Field_geom’
item.cc:4371: error: ‘Item_geometry_func’ was not declared in this scope
item.cc:4368: error: expected primary-expression before ‘)’ token
item.cc:4371: error: expected primary-expression before ‘)’ token
item.cc:4371: error: expected `)' before ‘this’
item.cc: In constructor ‘Item_type_holder::Item_type_holder(THD*, Item*)’:
item.cc:6494: error: ‘Item_geometry_func’ was not declared in this scope
item.cc:6494: error: expected primary-expression before ‘)’ token
item.cc:6494: error: expected primary-expression before ‘)’ token

How to repeat:
./configure --without-geometry
make

Suggested fix:
sql/item.cc:4366
#ifdef (SOME_MACRO_FOR_GEOMETRY_TYPE_EXISTING)
  case MYSQL_TYPE_GEOMETRY:
    return new Field_geom(max_length, maybe_null, name, table,
                          (Field::geometry_type)
                          ((type() == Item::TYPE_HOLDER) ?
                           ((Item_type_holder *)this)->get_geometry_type() :
                           ((Item_geometry_func *)this)->get_geometry_type()));
#endif

sql/item.cc:6491
#ifdef (SOME_MACRO_FOR_GEOMETRY_TYPE_EXISTING)
  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
[3 Mar 2008 19:54] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #29772