diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index ff232a61621bac3900d26dc24cb6fd4a47c10e6c..2cbd34c0d2c729ed613dee443603212c931e3e6a 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -491,12 +491,12 @@ 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;
 --error 0,1
---remove_file $MYSQL_TEST_DIR/var/tmp/data1.tmp
+--remove_file $MYSQLTEST_VARDIR/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;
---remove_file $MYSQL_TEST_DIR/var/tmp/data2.tmp
+--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
 
 SELECT @v19, @v20;
 SELECT * FROM t2;