summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
author <Dao-Gang.Qu@sun.com>2010-07-30 11:59:34 +0800
committer <Dao-Gang.Qu@sun.com>2010-07-30 11:59:34 +0800
commit96e113b60a6190d927936c2f9aa868b9d104af04 (patch)
tree4ce741be49cb9a26d7ba75b1fa3d6cfb47696865 /sql/sql_load.cc
parentccf6ec093e14e6a5eb0fc15c9f365bae9d1a57f6 (diff)
downloadmariadb-git-96e113b60a6190d927936c2f9aa868b9d104af04.tar.gz
Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile
With statement- or mixed-mode logging, "LOAD DATA INFILE" queries are written to the binlog using special types of log events. When mysqlbinlog reads such events, it re-creates the file in a temporary directory with a generated filename and outputs a "LOAD DATA INFILE" query where the filename is replaced by the generated file. The temporary file is not deleted by mysqlbinlog after termination. To fix the problem, in mixed mode we go to row-based. In SBR, we document it to remind user the tmpfile is left in a temporary directory.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index a4cf46b35e8..f9386206dce 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -141,6 +141,14 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
bool transactional_table;
DBUG_ENTER("mysql_load");
+ /*
+ Bug #34283
+ mysqlbinlog leaves tmpfile after termination if binlog contains
+ load data infile, so in mixed mode we go to row-based for
+ avoiding the problem.
+ */
+ thd->set_current_stmt_binlog_row_based_if_mixed();
+
#ifdef EMBEDDED_LIBRARY
read_file_from_client = 0; //server is always in the same process
#endif