diff options
author | unknown <Dao-Gang.Qu@sun.com> | 2010-08-03 11:49:14 +0800 |
---|---|---|
committer | unknown <Dao-Gang.Qu@sun.com> | 2010-08-03 11:49:14 +0800 |
commit | 3ac026543617cbebf76dca73d1d325eebb6687d3 (patch) | |
tree | 827bb821883bef2a58b2ea03a1f2d2607e6cdd6b /mysql-test/suite/rpl | |
parent | 6710830b547c2dd3128822822a6dd35ca081a3a5 (diff) | |
parent | bcb3170c978f3e5eb049185668de6afa172104e2 (diff) | |
download | mariadb-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 'mysql-test/suite/rpl')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata_fatal.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata_map.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_stm_log.test | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index daef153cdef..c1fd3396626 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -883,8 +883,8 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN -master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query # # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=# +master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 diff --git a/mysql-test/suite/rpl/t/rpl_loaddata.test b/mysql-test/suite/rpl/t/rpl_loaddata.test index c47b84144ff..d5e0388be46 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata.test @@ -3,7 +3,7 @@ # Added to skip if ndb is default # ######################################################## -- source include/not_ndb_default.inc --- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_binlog_format_statement.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test index e80fc160d8f..b8975308a86 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test @@ -1,4 +1,4 @@ -source include/have_binlog_format_mixed_or_statement.inc; +source include/have_binlog_format_statement.inc; source include/have_debug.inc; source include/master-slave.inc; diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index ddee9e7e989..1db7c4a893b 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -16,7 +16,7 @@ # BUG#33413 show binlog events fails if binlog has event size of close # to max_allowed_packet -source include/have_binlog_format_mixed_or_statement.inc; +source include/have_binlog_format_statement.inc; source include/master-slave.inc; diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index b85ed18ab51..1cf88deb56f 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -8,7 +8,7 @@ # 2 - Catches error. ########################################################################## ---source include/have_binlog_format_mixed_or_statement.inc +--source include/have_binlog_format_statement.inc --source include/have_innodb.inc --source include/have_debug.inc --source include/master-slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test index 2af9d7f85bc..7bc17fbaada 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log.test +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -1,5 +1,5 @@ # Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_binlog_format_statement.inc -- source include/master-slave.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test |