summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_loaddata.result
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-08-20 23:24:45 +0200
committerunknown <guilhem@mysql.com>2003-08-20 23:24:45 +0200
commit1542fffb345693565a32f9a2e6a1eba980aeaaf2 (patch)
tree6d56c107522f2e75c11380e6351b948e3ce70832 /mysql-test/r/rpl_loaddata.result
parentd43a347db179f4601465debc3bfd3cfbb87d1528 (diff)
downloadmariadb-git-1542fffb345693565a32f9a2e6a1eba980aeaaf2.tar.gz
First commit for fixing BUG#1100
"LOAD DATA INFILE is badly filtered by binlog-*-db rules". There will probably be a second final one to merge Dmitri's changes to rpl_log.result and mine. 2 new tests: rpl_loaddata_rule_m : test of logging of LOAD DATA INFILE when the master has binlog-*-db rules, rpl_loaddata_rule_s : test of logging of LOAD DATA INFILE when the slave has binlog-*-db rules and --log-slave-updates. mysql-test/r/rpl_loaddata.result: Test that logging of LOAD DATA INFILE is done on the slave mysql-test/t/rpl_loaddata.test: Test that logging of LOAD DATA is done on the slave sql/log.cc: debug info sql/log_event.cc: * Append_block, Exec_load and Delete_file now have a member 'db' like Create_file. This member is filled by mysql_load(). It is used for filtering by binlog-*-db rules, that's all. It's not written to the binlog, and so can't be read from the binlog. In other words, that's temporary info which is stored in the event and lost when it is written and deleted. * Better error messages in Append_block et al. events. * The slave now logs (log-slave-updates) the Create_file et al. events in mysql_load() (they are not directly copied from the events in the relay log, because this prevented filtering by binlog-*-db rules). Before, mysql_load() in the slave did no logging, now it does the logging, as in any regular thread. sql/log_event.h: New member 'db' for Append_block et al. events. sql/slave.cc: Removed useless code. Why was it useless: - CREATE_FILE_EVENT is not defined in 3.23. It appeared in 4.0. - in queue_old_event(), which is called only if the master is 3.23, we had a case CREATE_FILE_EVENT: so this case can be removed. - this case was the only caller of process_io_create_file() so this function can be removed. sql/sql_load.cc: Pass the db to events, so that they can be well filtered. sql/sql_repl.cc: Pass the db to events so that they can be well filtered.
Diffstat (limited to 'mysql-test/r/rpl_loaddata.result')
-rw-r--r--mysql-test/r/rpl_loaddata.result4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 05bdad0fb84..b42f78f01bd 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
+reset master;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
@@ -19,6 +20,9 @@ day id category name
2003-02-22 2461 b a a a @ %  ' " a
2003-03-22 2161 c asdf
2003-04-22 2416 a bbbbb
+show binlog events from 898;
+Log_name Pos Event_type Server_id Orig_log_pos Info
+slave-bin.001 898 Query 1 895 use test; insert into t3 select * from t2
drop table t1;
drop table t2;
drop table t3;