mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Merge from mysql-5.1 to mysql-5.5
This commit is contained in:
commit
50ce0ef66c
1 changed files with 17 additions and 26 deletions
|
@ -1198,6 +1198,23 @@ innobase_convert_from_id(
|
|||
strconvert(cs, from, system_charset_info, to, (uint) len, &errors);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Converts an identifier from my_charset_filename to UTF-8 charset. */
|
||||
extern "C"
|
||||
uint
|
||||
innobase_convert_to_system_charset(
|
||||
/*===============================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len, /* in: length of 'to', in bytes */
|
||||
uint* errors) /* out: error return */
|
||||
{
|
||||
CHARSET_INFO* cs1 = &my_charset_filename;
|
||||
CHARSET_INFO* cs2 = system_charset_info;
|
||||
|
||||
return(strconvert(cs1, from, cs2, to, len, errors));
|
||||
}
|
||||
|
||||
/******************************************************************//**
|
||||
Compares NUL-terminated UTF-8 strings case insensitively.
|
||||
@return 0 if a=b, <0 if a<b, >1 if a>b */
|
||||
|
@ -11989,29 +12006,3 @@ innobase_convert_to_filename_charset(
|
|||
|
||||
return(rlen);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Converts an identifier from my_charset_filename to UTF-8 charset. */
|
||||
extern "C"
|
||||
uint
|
||||
innobase_convert_to_system_charset(
|
||||
/*===============================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len, /* in: length of 'to', in bytes */
|
||||
uint* errors) /* out: error return */
|
||||
{
|
||||
uint rlen;
|
||||
CHARSET_INFO* cs1 = &my_charset_filename;
|
||||
CHARSET_INFO* cs2 = system_charset_info;
|
||||
|
||||
rlen = strconvert(cs1, from, cs2, to, len, errors);
|
||||
|
||||
if (*errors) {
|
||||
fprintf(stderr, "InnoDB: There was a problem in converting"
|
||||
"'%s' in charset %s to charset %s", from, cs1->name,
|
||||
cs2->name);
|
||||
}
|
||||
|
||||
return(rlen);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue