diff options
-rw-r--r-- | mysql-test/include/ndb_backup_print.inc | 3 | ||||
-rw-r--r-- | mysql-test/t/binlog_killed_simulate.test | 4 | ||||
-rw-r--r-- | mysql-test/t/binlog_start_comment.test | 2 | ||||
-rw-r--r-- | mysql-test/t/ctype_big5.test | 3 | ||||
-rw-r--r-- | mysql-test/t/distinct.test | 4 | ||||
-rw-r--r-- | mysql-test/t/ndb_autodiscover.test | 32 | ||||
-rw-r--r-- | mysql-test/t/ndb_loaddatalocal.test | 8 | ||||
-rw-r--r-- | mysql-test/t/ndb_restore_print.test | 20 | ||||
-rw-r--r-- | mysql-test/t/outfile.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_EE_error.test | 4 | ||||
-rw-r--r-- | mysql-test/t/rpl_loaddatalocal.test | 4 | ||||
-rw-r--r-- | mysql-test/t/symlink.test | 3 |
12 files changed, 49 insertions, 40 deletions
diff --git a/mysql-test/include/ndb_backup_print.inc b/mysql-test/include/ndb_backup_print.inc index 57fb279491c..7527f125686 100644 --- a/mysql-test/include/ndb_backup_print.inc +++ b/mysql-test/include/ndb_backup_print.inc @@ -1,6 +1,7 @@ --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 1 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter > $MYSQLTEST_VARDIR/tmp/tmp.dat --exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 2 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter >> $MYSQLTEST_VARDIR/tmp/tmp.dat --exec sort $MYSQLTEST_VARDIR/tmp/tmp.dat ---exec rm -f $MYSQLTEST_VARDIR/tmp/tmp.dat +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/tmp.dat --let ndb_restore_opts= --let ndb_restore_filter= diff --git a/mysql-test/t/binlog_killed_simulate.test b/mysql-test/t/binlog_killed_simulate.test index 670cd756803..3f50ac350d5 100644 --- a/mysql-test/t/binlog_killed_simulate.test +++ b/mysql-test/t/binlog_killed_simulate.test @@ -30,7 +30,7 @@ let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`; eval select $error_code /* must return 1 as query completed before got killed*/; # cleanup for the sub-case -system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog; +remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog; # @@ -58,7 +58,7 @@ let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`; eval select $error_code /* must return 0 to mean the killed query is in */; # cleanup for the sub-case -system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog; +remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog; drop table t1,t2; diff --git a/mysql-test/t/binlog_start_comment.test b/mysql-test/t/binlog_start_comment.test index 84889167cd2..2834c6d27e3 100644 --- a/mysql-test/t/binlog_start_comment.test +++ b/mysql-test/t/binlog_start_comment.test @@ -21,4 +21,4 @@ select * from t2; # clean up drop table t1,t2; -#--system rm $MYSQLTEST_VARDIR/tmp/binlog_start_comment.binlog +#--remove_file $MYSQLTEST_VARDIR/tmp/binlog_start_comment.binlog diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test index 0ed21091110..5a8a13f2bad 100644 --- a/mysql-test/t/ctype_big5.test +++ b/mysql-test/t/ctype_big5.test @@ -79,7 +79,8 @@ delete from t1; --eval select hex(load_file('$MYSQLTEST_VARDIR/master-data/test/t1.txt')); load data infile 't1.txt' into table t1; select hex(a) from t1; ---exec rm $MYSQLTEST_VARDIR/master-data/test/t1.txt +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.txt + drop table t1; --echo End of 5.0 tests diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index 7310f98cd16..19147a7d9cf 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -492,12 +492,12 @@ DROP TABLE t1; #SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE #'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; #LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2; -#--exec rm $MYSQL_TEST_DIR/var/tmp/data1.tmp +#--remove_file $MYSQL_TEST_DIR/var/tmp/data1.tmp # #SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE #'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; #LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2; -#--exec rm $MYSQL_TEST_DIR/var/tmp/data2.tmp +#--remove_file $MYSQL_TEST_DIR/var/tmp/data2.tmp # #SELECT @v19, @v20; #SELECT * FROM t2; diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test index 049dcd9755e..11bb0b1fb7f 100644 --- a/mysql-test/t/ndb_autodiscover.test +++ b/mysql-test/t/ndb_autodiscover.test @@ -24,7 +24,7 @@ create table t1( insert into t1 values(1, "Autodiscover"); flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ; select * from t1; show status like 'handler_discover%'; @@ -33,13 +33,13 @@ show status like 'handler_discover%'; # flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ; insert into t1 values (2, "Auto 2"); show status like 'handler_discover%'; insert into t1 values (3, "Discover 3"); show status like 'handler_discover%'; flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ; select * from t1 order by id; show status like 'handler_discover%'; @@ -48,7 +48,7 @@ show status like 'handler_discover%'; # flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ; update t1 set name="Autodiscover" where id = 2; show status like 'handler_discover%'; select * from t1 order by id; @@ -59,7 +59,7 @@ show status like 'handler_discover%'; # flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ; delete from t1 where id = 3; select * from t1 order by id; show status like 'handler_discover%'; @@ -111,7 +111,7 @@ show status like 'handler_discover%'; flush tables; # Remove the frm file from disk -system rm $MYSQLTEST_VARDIR/master-data/test/t3.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm ; --error 1050 create table t3( @@ -168,14 +168,14 @@ show status like 'handler_discover%'; # Remove the frm file from disk flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm ; show tables from test; show status like 'handler_discover%'; # Remove the frm file from disk again flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm ; --replace_column 7 # 8 # 9 # 12 # 13 # 15 # 18 # show table status; @@ -290,8 +290,8 @@ insert into t9 values (9); system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; # Remove t6, t7 from disk -system rm $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; -system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; SHOW TABLES; @@ -332,8 +332,8 @@ insert into t9 values (9); system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; # Remove t6, t7 from disk -system rm $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; -system rm $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm > /dev/null ; SHOW TABLES LIKE 't6'; @@ -375,9 +375,9 @@ insert into t3 values (3, "ndb table 3"); insert into t4 values (4); # Remove t1, t2, t3 from disk -system rm $MYSQLTEST_VARDIR/master-data/test/t1.frm > /dev/null ; -system rm $MYSQLTEST_VARDIR/master-data/test/t2.frm > /dev/null ; -system rm $MYSQLTEST_VARDIR/master-data/test/t3.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm > /dev/null ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm > /dev/null ; flush tables; # Select from the table which only exists in NDB. @@ -531,7 +531,7 @@ CREATE TABLE t9 ( insert t9 values(1, 2), (2,3), (3, 4), (4, 5); #Don't drop the table, instead remove the frm file -system rm $MYSQLTEST_VARDIR/master-data/test/t9.frm ; +remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm ; # Now leave test case, when ndb_autodiscover2 will run, this # MySQL Server will have been restarted because it has a diff --git a/mysql-test/t/ndb_loaddatalocal.test b/mysql-test/t/ndb_loaddatalocal.test index 47054ecfbf5..f8930255a2a 100644 --- a/mysql-test/t/ndb_loaddatalocal.test +++ b/mysql-test/t/ndb_loaddatalocal.test @@ -25,7 +25,7 @@ create table t1(a int) engine=ndb; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; select count(*) from t1; -system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile ; +remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile ; drop table t1; create table t1(a int) engine=myisam; @@ -37,7 +37,7 @@ drop table t1; create table t1(a int primary key) engine=ndb; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; +remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; select * from t1 order by a; drop table t1; @@ -50,7 +50,7 @@ drop table t1; create table t1(a int primary key) engine=ndb; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; +remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; select * from t1 order by a; drop table t1; @@ -63,7 +63,7 @@ drop table t1; create table t1(a int primary key) engine=ndb; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; +remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile; select * from t1 order by a; drop table t1; diff --git a/mysql-test/t/ndb_restore_print.test b/mysql-test/t/ndb_restore_print.test index 6dbbfdf5933..9a880f8968c 100644 --- a/mysql-test/t/ndb_restore_print.test +++ b/mysql-test/t/ndb_restore_print.test @@ -134,10 +134,14 @@ insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); --let ndb_restore_filter=test t1 --source include/ndb_backup_print.inc ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t2.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t3.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t4.txt --let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append --let ndb_restore_filter=test @@ -156,10 +160,10 @@ insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); --source include/show_msg.inc --exec sort $MYSQLTEST_VARDIR/tmp/t4.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t2.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t3.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t4.txt # now test some other datatypes drop table t1; diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 2b80b0b9d93..941bbe228d4 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -125,7 +125,7 @@ from information_schema.schemata where schema_name like 'mysqltest'; connection default; ---exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4 +--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 use test; revoke all privileges on *.* from user_1@localhost; drop user user_1@localhost; diff --git a/mysql-test/t/rpl_EE_error.test b/mysql-test/t/rpl_EE_error.test index 640a2b1a88c..75665d0ceea 100644 --- a/mysql-test/t/rpl_EE_error.test +++ b/mysql-test/t/rpl_EE_error.test @@ -6,9 +6,11 @@ source include/master-slave.inc; + create table t1 (a int) engine=myisam; flush tables; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYI + drop table if exists t1; save_master_pos; connection slave; diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test index af4fd0106bd..d3149bea427 100644 --- a/mysql-test/t/rpl_loaddatalocal.test +++ b/mysql-test/t/rpl_loaddatalocal.test @@ -25,7 +25,7 @@ eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.sele truncate table t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; -system rm $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile ; +--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile save_master_pos; connection slave; sync_with_master; @@ -52,7 +52,7 @@ drop table t1; create table t1(a int primary key); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; -system rm $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile ; +remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile ; select * from t1; save_master_pos; connection slave; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 9478abe1224..8ce1bca1ec1 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -185,7 +185,8 @@ drop table t1; # # Protect ourselves from data left in tmp/ by a previos possibly failed # test ---system rm -f $MYSQLTEST_VARDIR/tmp/t1.* +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.* --disable_query_log eval prepare stmt from "create table t1 (c char(10)) data directory='$MYSQLTEST_VARDIR/tmp'"; --enable_query_log |