From fb616ccc530e31a4fc44cb9e3d9ef51745182024 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Mar 2007 11:05:43 -0700 Subject: [PATCH] Modifying mysql-test-run.pl to allow steeing of --secure-file-priv to 'mysql-test' when running suites other tha the main one mysql-test/mysql-test-run.pl: Modifying to allow steeing of --secure-file-priv to 'mysql-test' when running suites other tha the main one --- mysql-test/mysql-test-run.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fadb7c5f0e0..c53c747caa5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3642,8 +3642,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 )