summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index e93417374fe..45c0efb10c2 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -104,9 +104,16 @@ int init_relay_log_info(Relay_log_info* rli,
rli->tables_to_lock= 0;
rli->tables_to_lock_count= 0;
- fn_format(rli->slave_patternload_file, PREFIX_SQL_LOAD, slave_load_tmpdir, "",
- MY_PACK_FILENAME | MY_UNPACK_FILENAME |
- MY_RETURN_REAL_PATH);
+ char pattern[FN_REFLEN];
+ if (fn_format(pattern, PREFIX_SQL_LOAD, slave_load_tmpdir, "",
+ MY_SAFE_PATH | MY_RETURN_REAL_PATH) == NullS)
+ {
+ pthread_mutex_unlock(&rli->data_lock);
+ sql_print_error("Unable to use slave's temporary directory %s",
+ slave_load_tmpdir);
+ DBUG_RETURN(1);
+ }
+ unpack_filename(rli->slave_patternload_file, pattern);
rli->slave_patternload_file_size= strlen(rli->slave_patternload_file);
/*