mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
branches/zip: innobase_convert_from_id(), innobase_convert_from_table_id():
Add the parameter struct charset_info_st* cs, so that the call thd_charset(current_thd) can be avoided. The macro current_thd has no defined value in the Windows plugin.
This commit is contained in:
parent
5dc842cf08
commit
c1cc5b1316
3 changed files with 22 additions and 20 deletions
|
@ -2541,7 +2541,7 @@ convert_id:
|
|||
len = 3 * len + 1;
|
||||
*id = dst = mem_heap_alloc(heap, len);
|
||||
|
||||
innobase_convert_from_id(dst, str, len);
|
||||
innobase_convert_from_id(cs, dst, str, len);
|
||||
} else if (!strncmp(str, srv_mysql50_table_name_prefix,
|
||||
sizeof srv_mysql50_table_name_prefix)) {
|
||||
/* This is a pre-5.1 table name
|
||||
|
@ -2555,7 +2555,7 @@ convert_id:
|
|||
len = 5 * len + 1;
|
||||
*id = dst = mem_heap_alloc(heap, len);
|
||||
|
||||
innobase_convert_from_table_id(dst, str, len);
|
||||
innobase_convert_from_table_id(cs, dst, str, len);
|
||||
}
|
||||
|
||||
return(ptr);
|
||||
|
|
|
@ -910,14 +910,14 @@ extern "C" UNIV_INTERN
|
|||
void
|
||||
innobase_convert_from_table_id(
|
||||
/*===========================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len) /* in: length of 'to', in bytes */
|
||||
struct charset_info_st* cs, /* in: the 'from' character set */
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len) /* in: length of 'to', in bytes */
|
||||
{
|
||||
uint errors;
|
||||
|
||||
strconvert(thd_charset(current_thd), from,
|
||||
&my_charset_filename, to, (uint) len, &errors);
|
||||
strconvert(cs, from, &my_charset_filename, to, (uint) len, &errors);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -926,14 +926,14 @@ extern "C" UNIV_INTERN
|
|||
void
|
||||
innobase_convert_from_id(
|
||||
/*=====================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len) /* in: length of 'to', in bytes */
|
||||
struct charset_info_st* cs, /* in: the 'from' character set */
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len) /* in: length of 'to', in bytes */
|
||||
{
|
||||
uint errors;
|
||||
|
||||
strconvert(thd_charset(current_thd), from,
|
||||
system_charset_info, to, (uint) len, &errors);
|
||||
strconvert(cs, from, system_charset_info, to, (uint) len, &errors);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
|
@ -174,20 +174,22 @@ UNIV_INTERN
|
|||
void
|
||||
innobase_convert_from_table_id(
|
||||
/*===========================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len); /* in: length of 'to', in bytes; should
|
||||
be at least 5 * strlen(to) + 1 */
|
||||
struct charset_info_st* cs, /* in: the 'from' character set */
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len); /* in: length of 'to', in bytes; should
|
||||
be at least 5 * strlen(to) + 1 */
|
||||
/**********************************************************************
|
||||
Converts an identifier to UTF-8. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
innobase_convert_from_id(
|
||||
/*=====================*/
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len); /* in: length of 'to', in bytes; should
|
||||
be at least 3 * strlen(to) + 1 */
|
||||
struct charset_info_st* cs, /* in: the 'from' character set */
|
||||
char* to, /* out: converted identifier */
|
||||
const char* from, /* in: identifier to convert */
|
||||
ulint len); /* in: length of 'to', in bytes; should
|
||||
be at least 3 * strlen(to) + 1 */
|
||||
/**********************************************************************
|
||||
Makes all characters in a NUL-terminated UTF-8 string lower case. */
|
||||
UNIV_INTERN
|
||||
|
|
Loading…
Add table
Reference in a new issue