1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Added checking for my.cnf file from environment variable MYSQL_HOME

instead of DATADIR.
This commit is contained in:
jani@ua141d10.elisa.omakaista.fi
2005-01-04 20:13:47 +02:00
parent a99921fb39
commit 81d99da104
6 changed files with 51 additions and 23 deletions

View File

@ -4,7 +4,7 @@ use Getopt::Long;
use POSIX qw(strftime);
$|=1;
$VER="2.11";
$VER="2.12";
$opt_config_file = undef();
$opt_example = 0;
@ -430,6 +430,16 @@ sub find_groups
{
$data[$i] = $line;
}
if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" &&
-r "$ENV{MYSQL_HOME}/my.cnf")
{
open(MY_CNF, "<$ENV{MYSQL_HOME}/my.cnf") && (@tmp=<MY_CNF>) &&
close(MY_CNF);
}
for (; ($line = shift @tmp); $i++)
{
$data[$i] = $line;
}
if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf")
{
open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);