summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-05-03 12:10:16 +0200
committerunknown <knielsen@knielsen-hq.org>2013-05-03 12:10:16 +0200
commitd0d05dae079554e1b7d4dd62ca8b364a8076510e (patch)
tree57e89ca0480ac96947450dfc3f283753bd4c9034 /sql/rpl_mi.cc
parent56d485e2b5d4bbc6ab20eb8e82197e9a557bb327 (diff)
parent5aa0d185ca18cf538eea5c9c501e1e342b41b274 (diff)
downloadmariadb-git-d0d05dae079554e1b7d4dd62ca8b364a8076510e.tar.gz
Merge 10.0-base -> 10.0
Diffstat (limited to 'sql/rpl_mi.cc')
-rw-r--r--sql/rpl_mi.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 32d3623cb70..d7ef562a5ff 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -723,10 +723,11 @@ bool check_master_connection_name(LEX_STRING *name)
*/
void create_logfile_name_with_suffix(char *res_file_name, size_t length,
- const char *info_file, bool append,
- LEX_STRING *suffix)
+ const char *info_file, bool append,
+ LEX_STRING *suffix)
{
- char buff[MAX_CONNECTION_NAME+1], res[MAX_CONNECTION_NAME+1], *p;
+ char buff[MAX_CONNECTION_NAME+1],
+ res[MAX_CONNECTION_NAME * MAX_FILENAME_MBWIDTH+1], *p;
p= strmake(res_file_name, info_file, length);
/* If not empty suffix and there is place left for some part of the suffix */
@@ -739,8 +740,6 @@ void create_logfile_name_with_suffix(char *res_file_name, size_t length,
/* Create null terminated string */
strmake(buff, suffix->str, suffix->length);
- /* Convert to lower case */
- my_casedn_str(system_charset_info, buff);
/* Convert to characters usable in a file name */
res_length= strconvert(system_charset_info, buff,
&my_charset_filename, res, sizeof(res), &errors);
@@ -856,7 +855,7 @@ bool Master_info_index::init_all_master_info()
{
int thread_mask;
int err_num= 0, succ_num= 0; // The number of success read Master_info
- char sign[MAX_CONNECTION_NAME];
+ char sign[MAX_CONNECTION_NAME+1];
File index_file_nr;
DBUG_ENTER("init_all_master_info");
@@ -908,11 +907,14 @@ bool Master_info_index::init_all_master_info()
lock_slave_threads(mi);
init_thread_mask(&thread_mask,mi,0 /*not inverse*/);
- create_logfile_name_with_suffix(buf_master_info_file, sizeof(buf_master_info_file),
- master_info_file, 0, &connection_name);
+ create_logfile_name_with_suffix(buf_master_info_file,
+ sizeof(buf_master_info_file),
+ master_info_file, 0,
+ &mi->cmp_connection_name);
create_logfile_name_with_suffix(buf_relay_log_info_file,
- sizeof(buf_relay_log_info_file),
- relay_log_info_file, 0, &connection_name);
+ sizeof(buf_relay_log_info_file),
+ relay_log_info_file, 0,
+ &mi->cmp_connection_name);
if (global_system_variables.log_warnings > 1)
sql_print_information("Reading Master_info: '%s' Relay_info:'%s'",
buf_master_info_file, buf_relay_log_info_file);