117
117
const CHARSET_INFO *StorageEngine::getSchemaCollation(const identifier::Schema &identifier)
119
message::schema::shared_ptr schmema_proto;
121
schmema_proto= StorageEngine::getSchemaDefinition(identifier);
123
if (schmema_proto && schmema_proto->has_collation())
125
const std::string buffer= schmema_proto->collation();
126
const CHARSET_INFO* cs= get_charset_by_name(buffer.c_str());
131
identifier.getSQLPath(path);
133
errmsg_printf(error::ERROR,
134
_("Error while loading database options: '%s':"), path.c_str());
135
errmsg_printf(error::ERROR, ER(ER_UNKNOWN_COLLATION), buffer.c_str());
137
return default_charset_info;
119
message::schema::shared_ptr schmema_proto= StorageEngine::getSchemaDefinition(identifier);
120
if (not schmema_proto || not schmema_proto->has_collation())
121
return default_charset_info;
122
const std::string buffer= schmema_proto->collation();
123
if (const CHARSET_INFO* cs= get_charset_by_name(buffer.c_str()))
125
errmsg_printf(error::ERROR, _("Error while loading database options: '%s':"), identifier.getSQLPath().c_str());
126
errmsg_printf(error::ERROR, ER(ER_UNKNOWN_COLLATION), buffer.c_str());
143
127
return default_charset_info;