summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2017-08-23 09:16:12 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2017-08-23 09:16:12 +0530
commitd75f8a174218fd0ada64222d2a538f7aace897bc (patch)
tree75c0af09a0e32e06f40d8a5d347c8ab660116e00
parent6a6d5bc98abdd25b32590fea7ef6572ecc355d7e (diff)
downloadmariadb-git-d75f8a174218fd0ada64222d2a538f7aace897bc.tar.gz
Bug#24763131 LOCAL-INFILE DEFAULT SHOULD BE DISABLED
Problem & Analysis: Slave's Receiver thread, Applier thread and worker threads are created with LOCAL-INFILE option enabled. As the document says https://dev.mysql.com/doc/refman/5.7/en/load-data-local.html, there are some issues if a thread enables local infile. This flag should be enabled with care. But for the above mentioned internal threads, server is enabling it at the time of creation. Fix: Further analysis on the code shows that none of threads really need this flag to be enabled at any time as Slave never executes "LOAD DATA LOCAL INFILE" after reading it from Relay log. Applier thread removes "LOCAL" before start executing the query.
-rw-r--r--sql/slave.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 1e641ac6d7e..e533bc09b3d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2109,7 +2109,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd->slave_thread = 1;
thd->enable_slow_log= opt_log_slow_slave_statements;
set_slave_thread_options(thd);
- thd->client_capabilities = CLIENT_LOCAL_FILES;
mysql_mutex_lock(&LOCK_thread_count);
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
mysql_mutex_unlock(&LOCK_thread_count);