summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-10-02 16:35:03 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-10-02 16:35:03 +0800
commit228ae2bf50c776e94decc731decefe6eaae0118f (patch)
tree35fdfabc935ac8cfe7c671a062f8241a0e88782f /sql
parent9739efbfec4c069996cf2f46f165e555a7edf30f (diff)
downloadmariadb-git-228ae2bf50c776e94decc731decefe6eaae0118f.tar.gz
Backport BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE
CHANGE MASTER TO command required the value for RELAY_LOG_FILE to be an absolute path, which was different from the requirement of MASTER_LOG_FILE. This patch fixed the problem by changing the value for RELAY_LOG_FILE to be the basename of the log file as that for MASTER_LOG_FILE.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_repl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index a899c8b7551..2c373059bf7 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1400,9 +1400,11 @@ bool change_master(THD* thd, Master_info* mi)
if (lex_mi->relay_log_name)
{
need_relay_log_purge= 0;
- strmake(mi->rli.group_relay_log_name,lex_mi->relay_log_name,
+ char relay_log_name[FN_REFLEN];
+ mi->rli.relay_log.make_log_name(relay_log_name, lex_mi->relay_log_name);
+ strmake(mi->rli.group_relay_log_name, relay_log_name,
sizeof(mi->rli.group_relay_log_name)-1);
- strmake(mi->rli.event_relay_log_name,lex_mi->relay_log_name,
+ strmake(mi->rli.event_relay_log_name, relay_log_name,
sizeof(mi->rli.event_relay_log_name)-1);
}