summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmysql-test/mysql-test-run.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 513858250aa..e629d2af87e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3664,8 +3664,16 @@ sub mysqld_arguments ($$$$$) {
if ( $mysql_version_id >= 50036)
{
- # Prevent the started mysqld to access files outside of vardir
- mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
+ # By default, prevent the started mysqld to access files outside of vardir
+ my $secure_file_dir= $opt_vardir;
+ if ( $opt_suite ne "main" )
+ {
+ # When running a suite other than default allow the mysqld
+ # access to subdirs of mysql-test/ in order to make it possible
+ # to "load data" from the suites data/ directory.
+ $secure_file_dir= $glob_mysql_test_dir;
+ }
+ mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $secure_file_dir);
}
if ( $mysql_version_id >= 50000 )