########################################################################## # This test verifies if the slave fails gracefully when the temporary # file used to load data is removed while it is about to be used it. # Similar errors are caught if the temporary directory is removed. # # Steps: # 1 - Creates a table and populates it through "LOAD DATA INFILE". # 2 - Catches error. ########################################################################## --source include/have_binlog_format_mixed_or_statement.inc --source include/have_innodb.inc --source include/have_debug.inc --source include/master-slave.inc --source include/not_embedded.inc ########################################################################## # Loading data ########################################################################## connection master; create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; start transaction; insert into t1(b) values (1); insert into t1(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t1; commit; ########################################################################## # Catch Error ########################################################################## connection slave; source include/wait_for_slave_sql_to_stop.inc; --let $error= query_get_value(SHOW SLAVE STATUS, Last_Errno, 1) # windows and linux different error numbers here: # Windows: # - Last_Errno 29 (File not found) # Unix like OS: # - Last_Errno 13 (Can't stat file) --let $assertion= `SELECT $error=29 OR $error=13` if (!$assertion) { --echo UNEXPECTED ERROR NUMBER: $error } ########################################################################## # Clean up ########################################################################## connection master; drop table t1; connection slave; drop table t1; call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave: File.* not found.*");