diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-02-21 09:36:07 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-02-21 09:36:07 +0000 |
commit | d822ab8957ad636de01eaabfc4981f0e0d0c5b47 (patch) | |
tree | da0f9ea1883f6601834e69916f437846be614243 /sql/rpl_rli.cc | |
parent | 9b36597ac1836020d875538b891cc7ebbcbbd305 (diff) | |
download | mariadb-git-d822ab8957ad636de01eaabfc4981f0e0d0c5b47.tar.gz |
BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 3a0f784d195..6077c17e1f0 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -104,6 +104,12 @@ 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); + to_unix_path(rli->slave_patternload_file); + rli->slave_patternload_file_size= strlen(rli->slave_patternload_file); + /* The relay log will now be opened, as a SEQ_READ_APPEND IO_CACHE. Note that the I/O thread flushes it to disk after writing every |