diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
index 962572d3aec7faeec4957be90c6ffe1cb8435e88..b3fa2fabe2c43ee1e33f42daaa757ecd86024cea 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
@@ -72,7 +72,7 @@ DROP TABLE test.t2;
 # will be created. You will need to go to the mysql-test dir and diff
 # the files your self to see what is not matching :-)
 
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
 
 # Cleanup dump files.
 # Long-term "system rm" is not portable; we could live without
diff --git a/mysql-test/extra/rpl_tests/rpl_row_blob.test b/mysql-test/extra/rpl_tests/rpl_row_blob.test
index 75a2dc2cf9e18f697f6a9979a2680551e5370846..2dc6867df329db11003f18063803bb6e9f889d54 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_blob.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_blob.test
@@ -179,7 +179,7 @@ connection master;
 --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql
 --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
 
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql;
 
 DROP TABLE IF EXISTS test.t1;
 DROP TABLE IF EXISTS test.t2;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test
index 153a03da2e70e8000bf44a4ddbf5e6b5e9b79797..3f83f3a160d99b5a764a0b1b8f4d3e2c1e9948ef 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test
@@ -90,7 +90,7 @@ DROP TABLE test.t1;
 # the files yourself to see what is not matching :-) File are located
 # in $MYSQLTEST_VARDIR/tmp
 
-exec diff $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
 
 
 # End of 5.0 test case
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp006.test b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
index 25073e549914e384eedbda71bee108f831d15385..da9206d7d3ff6ad475c4f99ffb2cf3ea69d7eab2 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp006.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
@@ -84,7 +84,7 @@ DROP DATABASE mysqltest1;
 # the files your self to see what is not matching :-) Failed test 
 # Dump files will be located in $MYSQLTEST_VARDIR/tmp.
 
-exec diff $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
 
 sync_slave_with_master;
 
diff --git a/mysql-test/t/rpl_ndb_bank.test b/mysql-test/t/rpl_ndb_bank.test
index 9174d09484bd84dc518b5864eaeaaa9136fe0eb0..c1448573f5b307aad98b52c808f9586b25895ef4 100644
--- a/mysql-test/t/rpl_ndb_bank.test
+++ b/mysql-test/t/rpl_ndb_bank.test
@@ -175,7 +175,7 @@ insert into t1 values (1);
 --connection master
 drop table t1;
 
---exec diff $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql
+diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql;
 
   --dec $2
 }
diff --git a/mysql-test/t/rpl_ndb_dd_advance.test b/mysql-test/t/rpl_ndb_dd_advance.test
index 82ec85c09a57470991d9110ce6aa90df256574f6..0a1ab37cdada10fc4644a59512ac8b2604206446 100644
--- a/mysql-test/t/rpl_ndb_dd_advance.test
+++ b/mysql-test/t/rpl_ndb_dd_advance.test
@@ -571,7 +571,7 @@ connection master;
 
 --echo ****** Do dumps compare ************
 
---exec diff $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql
+diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql;
 
 ## Note: Ths files should only get removed, if the above diff succeeds.
 
diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test
index 379b1edec02bd5e96a52c7a6387443c79be40d00..4def515eb138ab9ebcbfff6ccee268ed725df5fd 100644
--- a/mysql-test/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/t/rpl_rbr_to_sbr.test
@@ -39,7 +39,7 @@ DROP TABLE IF EXISTS t1;
 # will be created. You will need to go to the mysql-test dir and diff
 # the files your self to see what is not matching
 
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
 
 # If all is good, we can remove the files
 
diff --git a/mysql-test/t/rpl_row_NOW.test b/mysql-test/t/rpl_row_NOW.test
index 24a8774284ab63d6bb52e1443c93a8b38d83dbf9..31d392b735f28a7981c8e2a9d9fd0ee1b7b2a7af 100644
--- a/mysql-test/t/rpl_row_NOW.test
+++ b/mysql-test/t/rpl_row_NOW.test
@@ -63,7 +63,7 @@ DROP FUNCTION mysqltest1.f1;
 # the files your self to see what is not matching :-) The failed dump 
 # files will be located in $MYSQLTEST_VARDIR/tmp
 
-exec diff $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql;
 
 # If all is good, when can cleanup our dump files.
 system rm $MYSQLTEST_VARDIR/tmp/NOW_master.sql;
diff --git a/mysql-test/t/rpl_row_func002.test b/mysql-test/t/rpl_row_func002.test
index 46767abd529af2b068f9f76ef7ca81f86bab1a65..ce3fc124387070863431908b2035721e39ea7c31 100644
--- a/mysql-test/t/rpl_row_func002.test
+++ b/mysql-test/t/rpl_row_func002.test
@@ -97,7 +97,7 @@ sync_slave_with_master;
 # the files your self to see what is not matching :-). The files are located
 # in mysql-test/var/tmp
 
-exec diff $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql;
 
 # End of 5.0 test case
 
diff --git a/mysql-test/t/rpl_row_sp001.test b/mysql-test/t/rpl_row_sp001.test
index 8e01cbc4f44d7e64e7bda1cec9ec9a966a973ba4..c6fc29e3750200becfc28a8bdb96e99e4de7f199 100644
--- a/mysql-test/t/rpl_row_sp001.test
+++ b/mysql-test/t/rpl_row_sp001.test
@@ -137,7 +137,7 @@ sync_slave_with_master;
 # the files your self to see what is not matching :-) Failed dump files
 # will be located in $MYSQLTEST_VARDIR/tmp
 
---exec diff $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql;
 
 # If all is good, when can cleanup our dump files.
 system rm $MYSQLTEST_VARDIR/tmp/sp001_master.sql;
diff --git a/mysql-test/t/rpl_row_sp011.test b/mysql-test/t/rpl_row_sp011.test
index 54e708492d1ee4c87783f685a4d2c5edb8944aa6..fb87249d93c380906872b9896d6abbe016225661 100644
--- a/mysql-test/t/rpl_row_sp011.test
+++ b/mysql-test/t/rpl_row_sp011.test
@@ -102,7 +102,7 @@ sync_slave_with_master;
 # the files your self to see what is not matching :-) Failed test 
 # Will leave dump files in $MYSQLTEST_VARDIR/tmp
 
-exec diff $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql;
 
 # If all is good, when can cleanup our dump files.
 system rm $MYSQLTEST_VARDIR/tmp/sp011_master.sql;
diff --git a/mysql-test/t/rpl_row_trig001.test b/mysql-test/t/rpl_row_trig001.test
index 931cab959482cd432c9e2dbba0ac748232d979c1..7b1fca2d6a17437a851df0dad2205a73c9920522 100644
--- a/mysql-test/t/rpl_row_trig001.test
+++ b/mysql-test/t/rpl_row_trig001.test
@@ -95,6 +95,6 @@ sync_slave_with_master;
 # the files your self to see what is not matching :-) Failed tests 
 # will leave dump files in $MYSQLTEST_VARDIR/tmp
 
-exec diff $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql;
 
 # End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_trig003.test b/mysql-test/t/rpl_row_trig003.test
index d4570afd0941fa86c75d062d3512c61e859e5bc8..4a1bbc5ca89a1f819f3f7230462d99142f106bed 100644
--- a/mysql-test/t/rpl_row_trig003.test
+++ b/mysql-test/t/rpl_row_trig003.test
@@ -147,6 +147,6 @@ DROP TABLE IF EXISTS test.t2;
 DROP TABLE IF EXISTS test.t3;
 --enable_warnings
 
-exec diff $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql;
 
 # End of 5.0 test case
diff --git a/mysql-test/t/rpl_sp004.test b/mysql-test/t/rpl_sp004.test
index 055a13cc157513258cac60acf79bf422deb892a6..967e7007c15bf7fefe7b33dcd9bb89c22afcbc23 100644
--- a/mysql-test/t/rpl_sp004.test
+++ b/mysql-test/t/rpl_sp004.test
@@ -91,7 +91,7 @@ sync_slave_with_master;
 
 # If the test fails, you will need to diff the dumps to see why.
 
--- exec diff $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql
+diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql;
 
 
 # End of 5.0 test case
diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test
index ccd505941c8d8dcd9457dd318bc58a925b9d35b2..2f29ef1d03ad5899f2857402fa2a16ff9e43e64d 100644
--- a/mysql-test/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/t/rpl_switch_stm_row_mixed.test
@@ -509,7 +509,7 @@ sync_slave_with_master;
 # will be created. You will need to go to the mysql-test dir and diff
 # the files your self to see what is not matching
 
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
 
 connection master;
 --replace_column 2 # 5 #
@@ -537,7 +537,7 @@ drop database mysqltest1;
 --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
 # the old mysqldump output on slave is the same as what it was on
 # master before restoring on master.
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
 }
 
 drop database mysqltest1;