mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
bzr merge from guilhem's maria tree to our local 5.1
configure.in: Manually merged mysql-test/lib/My/ConfigFactory.pm: Manually merged mysql-test/mysql-test-run.pl: Manually merged mysql-test/t/information_schema.test: Manually merged sql/handler.cc: Manually merged support-files/mysql.spec.sh: Manually merged
This commit is contained in:
@ -15,10 +15,10 @@
|
||||
|
||||
|
||||
/* Copy data from a textfile to table */
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include <my_dir.h>
|
||||
#include <m_ctype.h>
|
||||
#include "rpl_mi.h"
|
||||
#include "sql_repl.h"
|
||||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
@ -310,8 +310,31 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
is_fifo = 1;
|
||||
#endif
|
||||
|
||||
if (opt_secure_file_priv &&
|
||||
strncmp(opt_secure_file_priv, name, strlen(opt_secure_file_priv)))
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
|
||||
if (strncmp(active_mi->rli.slave_patternload_file, name,
|
||||
active_mi->rli.slave_patternload_file_size))
|
||||
{
|
||||
/*
|
||||
LOAD DATA INFILE in the slave SQL Thread can only read from
|
||||
--slave-load-tmpdir". This should never happen. Please, report a bug.
|
||||
*/
|
||||
|
||||
sql_print_error("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir. " \
|
||||
"Please, report a bug.");
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--slave-load-tmpdir");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
#else
|
||||
/*
|
||||
This is impossible and should never happen.
|
||||
*/
|
||||
DBUG_ASSERT(FALSE);
|
||||
#endif
|
||||
}
|
||||
else if (opt_secure_file_priv &&
|
||||
strncmp(opt_secure_file_priv, name, strlen(opt_secure_file_priv)))
|
||||
{
|
||||
/* Read only allowed from within dir specified by secure_file_priv */
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
|
||||
|
Reference in New Issue
Block a user