summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2017-02-13 17:29:32 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2017-02-13 17:29:32 -0500
commit2e8fa1c2b2867b99b5cc7f987ad64b666e0af2c4 (patch)
treef45514e9f7eb49dd8232814b3baa1afbbca5e035 /mysql-test
parent60c932a3d025d94bd319da4f34e7c498205e4206 (diff)
downloadmariadb-git-2e8fa1c2b2867b99b5cc7f987ad64b666e0af2c4.tar.gz
MDEV-12058: MariaDB Test Suite issue with test sys_vars.secure_file_priv.test
Try to remove bug50373.txt before using it in SELECT .. OUTFILE (in case its a leftover from previous test runs).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/sys_vars/t/secure_file_priv.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv.test b/mysql-test/suite/sys_vars/t/secure_file_priv.test
index 5c53da58275..a5a465d8c98 100644
--- a/mysql-test/suite/sys_vars/t/secure_file_priv.test
+++ b/mysql-test/suite/sys_vars/t/secure_file_priv.test
@@ -21,6 +21,9 @@ SHOW VARIABLES LIKE 'secure_file_priv';
--perl
use File::Basename;
my $protected_file= dirname($ENV{MYSQLTEST_VARDIR}).'/bug50373.txt';
+# Ensure bug50373.txt does not exist (e.g. leftover from previous
+# test runs).
+unlink $protected_file;
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/bug50373.inc") or die;
print FILE "SELECT * FROM t1 INTO OUTFILE '".$protected_file."';\n";
print FILE "DELETE FROM t1;\n";