Item_param::eq(const Item *item, bool binary_cmp) const
{
  if (!basic_const_item())
    return FALSE;

  // There's no "default". See comments in Item_param::save_in_field().
  switch (state) {
  case IGNORE_VALUE:
  case DEFAULT_VALUE:
    invalid_default_param();
    return false;
  case NULL_VALUE:
    return null_eq(item);
  case INT_VALUE:
    return int_eq(value.integer, item);
  case REAL_VALUE:
    return real_eq(value.real, item);
  case STRING_VALUE:
  case LONG_DATA_VALUE:
    return str_eq(&str_value, item, binary_cmp);
  case DECIMAL_VALUE:
  case TIME_VALUE:
  case NO_VALUE:
    return false;
  }
  DBUG_ASSERT(0); // Garbage
  return FALSE;
}
Item_param::eq(const Item *item, bool binary_cmp) const
{
  if (!basic_const_item())
    return FALSE;

   
  switch (state) {
  case IGNORE_VALUE:
  case DEFAULT_VALUE:
    invalid_default_param();
    return false;
  case NULL_VALUE:
    return null_eq(item);
  case INT_VALUE:
    return int_eq(value.integer, item);
  case REAL_VALUE:
    return real_eq(value.real, item);
  case STRING_VALUE:
  case LONG_DATA_VALUE:
    return str_eq(&str_value, item, binary_cmp);
  case DECIMAL_VALUE:
  case TIME_VALUE:
  case NO_VALUE:
    return false;
  }
  DBUG_ASSERT(0);  
  return FALSE;
}