mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4928 Merge collation customization improvements
Merging the following MySQL-5.6 changes: - WL#5624: Collation customization improvements http://dev.mysql.com/worklog/task/?id=5624 - WL#4013: Unicode german2 collation http://dev.mysql.com/worklog/task/?id=4013 - Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars http://bugs.mysql.com/bug.php?id=62429 (required by WL#5624)
This commit is contained in:
@ -745,6 +745,35 @@ typedef struct system_status_var
|
||||
|
||||
void mark_transaction_to_rollback(THD *thd, bool all);
|
||||
|
||||
|
||||
/**
|
||||
Get collation by name, send error to client on failure.
|
||||
@param name Collation name
|
||||
@param name_cs Character set of the name string
|
||||
@return
|
||||
@retval NULL on error
|
||||
@retval Pointter to CHARSET_INFO with the given name on success
|
||||
*/
|
||||
inline CHARSET_INFO *
|
||||
mysqld_collation_get_by_name(const char *name,
|
||||
CHARSET_INFO *name_cs= system_charset_info)
|
||||
{
|
||||
CHARSET_INFO *cs;
|
||||
MY_CHARSET_LOADER loader;
|
||||
my_charset_loader_init_mysys(&loader);
|
||||
if (!(cs= my_collation_get_by_name(&loader, name, MYF(0))))
|
||||
{
|
||||
ErrConvString err(name, name_cs);
|
||||
my_error(ER_UNKNOWN_COLLATION, MYF(0), err.ptr());
|
||||
if (loader.error[0])
|
||||
push_warning_printf(current_thd,
|
||||
Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_UNKNOWN_COLLATION, "%s", loader.error);
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
|
||||
|
||||
#ifdef MYSQL_SERVER
|
||||
|
||||
void free_tmp_table(THD *thd, TABLE *entry);
|
||||
|
Reference in New Issue
Block a user