summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmysql-test/mysql-test-run.pl13
-rw-r--r--scripts/mysqlaccess.sh15
2 files changed, 23 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 86d37a56835..2ca5c83e3f4 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-
-# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -2455,6 +2455,17 @@ sub environment_setup {
"$basedir/myisam/myisampack"));
# ----------------------------------------------------
+ # mysqlaccess
+ # ----------------------------------------------------
+ my $mysqlaccess=
+ mtr_pl_maybe_exists("$bindir/scripts/mysqlaccess") ||
+ mtr_pl_maybe_exists("$path_client_bindir/mysqlaccess");
+ if ($mysqlaccess)
+ {
+ $ENV{'MYSQLACCESS'}= $mysqlaccess;
+ }
+
+ # ----------------------------------------------------
# mysqlhotcopy
# ----------------------------------------------------
my $mysqlhotcopy=
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh
index 03810e95b72..85112a59ee4 100644
--- a/scripts/mysqlaccess.sh
+++ b/scripts/mysqlaccess.sh
@@ -477,15 +477,22 @@ MySQLaccess::Report::Print_Header();
# *****************************
# Read configuration-file
MySQLaccess::Debug::Print(1, "Reading configuration file...");
- if (-f "./$script_conf") {
- require "./$script_conf";
- }
- elsif (-f "@sysconfdir@/$script_conf") {
+ if (-f "@sysconfdir@/$script_conf") {
+ print "Configuration file '$script_conf' is found in '@sysconfdir@/'\n";
require "@sysconfdir@/$script_conf";
}
elsif (-f "/etc/$script_conf") {
+ print "Configuration file '$script_conf' is found in '/etc/'\n";
require "/etc/$script_conf";
}
+ elsif (-f "./$script_conf") {
+ print "\nERROR! Configuration file '$script_conf' is found in the current ";
+ print "directory.\nThe permissible locations for this file are either ";
+ print "@sysconfdir@/ or /etc/\n";
+ print "Please move it to one of these locations and retry.\n\n";
+ exit 0;
+ }
+
# ****************************
# Read in all parameters