Commit 39147158 authored by marko's avatar marko

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.
parent dc32dbdb
...@@ -2541,7 +2541,7 @@ convert_id: ...@@ -2541,7 +2541,7 @@ convert_id:
len = 3 * len + 1; len = 3 * len + 1;
*id = dst = mem_heap_alloc(heap, len); *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, } else if (!strncmp(str, srv_mysql50_table_name_prefix,
sizeof srv_mysql50_table_name_prefix)) { sizeof srv_mysql50_table_name_prefix)) {
/* This is a pre-5.1 table name /* This is a pre-5.1 table name
...@@ -2555,7 +2555,7 @@ convert_id: ...@@ -2555,7 +2555,7 @@ convert_id:
len = 5 * len + 1; len = 5 * len + 1;
*id = dst = mem_heap_alloc(heap, len); *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); return(ptr);
......
...@@ -910,14 +910,14 @@ extern "C" UNIV_INTERN ...@@ -910,14 +910,14 @@ extern "C" UNIV_INTERN
void void
innobase_convert_from_table_id( innobase_convert_from_table_id(
/*===========================*/ /*===========================*/
struct charset_info_st* cs, /* in: the 'from' character set */
char* to, /* out: converted identifier */ char* to, /* out: converted identifier */
const char* from, /* in: identifier to convert */ const char* from, /* in: identifier to convert */
ulint len) /* in: length of 'to', in bytes */ ulint len) /* in: length of 'to', in bytes */
{ {
uint errors; uint errors;
strconvert(thd_charset(current_thd), from, strconvert(cs, from, &my_charset_filename, to, (uint) len, &errors);
&my_charset_filename, to, (uint) len, &errors);
} }
/********************************************************************** /**********************************************************************
...@@ -926,14 +926,14 @@ extern "C" UNIV_INTERN ...@@ -926,14 +926,14 @@ extern "C" UNIV_INTERN
void void
innobase_convert_from_id( innobase_convert_from_id(
/*=====================*/ /*=====================*/
struct charset_info_st* cs, /* in: the 'from' character set */
char* to, /* out: converted identifier */ char* to, /* out: converted identifier */
const char* from, /* in: identifier to convert */ const char* from, /* in: identifier to convert */
ulint len) /* in: length of 'to', in bytes */ ulint len) /* in: length of 'to', in bytes */
{ {
uint errors; uint errors;
strconvert(thd_charset(current_thd), from, strconvert(cs, from, system_charset_info, to, (uint) len, &errors);
system_charset_info, to, (uint) len, &errors);
} }
/********************************************************************** /**********************************************************************
......
...@@ -174,6 +174,7 @@ UNIV_INTERN ...@@ -174,6 +174,7 @@ UNIV_INTERN
void void
innobase_convert_from_table_id( innobase_convert_from_table_id(
/*===========================*/ /*===========================*/
struct charset_info_st* cs, /* in: the 'from' character set */
char* to, /* out: converted identifier */ char* to, /* out: converted identifier */
const char* from, /* in: identifier to convert */ const char* from, /* in: identifier to convert */
ulint len); /* in: length of 'to', in bytes; should ulint len); /* in: length of 'to', in bytes; should
...@@ -184,6 +185,7 @@ UNIV_INTERN ...@@ -184,6 +185,7 @@ UNIV_INTERN
void void
innobase_convert_from_id( innobase_convert_from_id(
/*=====================*/ /*=====================*/
struct charset_info_st* cs, /* in: the 'from' character set */
char* to, /* out: converted identifier */ char* to, /* out: converted identifier */
const char* from, /* in: identifier to convert */ const char* from, /* in: identifier to convert */
ulint len); /* in: length of 'to', in bytes; should ulint len); /* in: length of 'to', in bytes; should
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment