bool LEX::map_data_type(const Lex_ident_sys_st &schema_name,
                        Lex_field_type_st *type) const
{
  const Schema *schema= schema_name.str ?
                        Schema::find_by_name(schema_name) :
                        Schema::find_implied(thd);
  if (!schema)
  {
    char buf[128];
    const Name type_name= type->type_handler()->name();
    my_snprintf(buf, sizeof(buf), "%.*s.%.*s",
                (int) schema_name.length, schema_name.str,
                (int) type_name.length(), type_name.ptr());
#if MYSQL_VERSION_ID > 100500
#error Please remove the old code
    my_error(ER_UNKNOWN_DATA_TYPE, MYF(0), buf);
#else
    my_printf_error(ER_UNKNOWN_ERROR, "Unknown data type: '%-.64s'",
                    MYF(0), buf);
#endif
    return true;
  }
  const Type_handler *mapped= schema->map_data_type(thd, type->type_handler());
  type->set_handler(mapped);
  return false;
}
bool LEX::map_data_type(const Lex_ident_sys_st &schema_name,
                        Lex_field_type_st *type) const
{
  const Schema *schema= schema_name.str ?
                        Schema::find_by_name(schema_name) :
                        Schema::find_implied(thd);
  if (!schema)
  {
    char buf[128];
    const Name type_name= type->type_handler()->name();
    my_snprintf(buf, sizeof(buf), "%.*s.%.*s",
                (int) schema_name.length, schema_name.str,
                (int) type_name.length(), type_name.ptr());
#if MYSQL_VERSION_ID > 100500
#error Please remove the old code
    my_error(ER_UNKNOWN_DATA_TYPE, MYF(0), buf);
#else
    my_printf_error(ER_UNKNOWN_ERROR, "Unknown data type: '%-.64s'",
                    MYF(0), buf);
#endif
    return true;
  }
  const Type_handler *mapped= schema->map_data_type(thd, type->type_handler());
  type->set_handler(mapped);
  return false;
}