summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorunknown <Dao-Gang.Qu@sun.com>2010-08-03 11:49:14 +0800
committerunknown <Dao-Gang.Qu@sun.com>2010-08-03 11:49:14 +0800
commit3ac026543617cbebf76dca73d1d325eebb6687d3 (patch)
tree827bb821883bef2a58b2ea03a1f2d2607e6cdd6b /sql/sql_load.cc
parent6710830b547c2dd3128822822a6dd35ca081a3a5 (diff)
parentbcb3170c978f3e5eb049185668de6afa172104e2 (diff)
downloadmariadb-git-3ac026543617cbebf76dca73d1d325eebb6687d3.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. mysql-test/suite/binlog/r/binlog_mixed_load_data.result: Test result for BUG#34283. mysql-test/suite/binlog/t/binlog_killed_simulate.test: Updated for BUg#34283 mysql-test/suite/binlog/t/binlog_mixed_load_data.test: Added the test file to verify that 'load data infile...' statement will go to row-based in mixed mode. mysql-test/suite/binlog/t/binlog_stm_blackhole.test: Updated for BUg#34283 mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Updated for Bug#34283 mysql-test/suite/rpl/t/rpl_loaddata.test: Updated for Bug#34283 mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Updated for Bug#34283 mysql-test/suite/rpl/t/rpl_loaddata_map.test: Updated for Bug#34283 mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: Updated for Bug#34283 mysql-test/suite/rpl/t/rpl_stm_log.test: Updated for B mysys/stacktrace.c: Auto merge sql/sql_lex.cc: Auto merg sql/sql_load.cc: Added code to go to row-based in mixed mode for 'load data infile ...' statement
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 d367c1c4fde..15efa488173 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -189,6 +189,14 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
bool is_concurrent;
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_format_row_if_mixed();
+
#ifdef EMBEDDED_LIBRARY
read_file_from_client = 0; //server is always in the same process
#endif