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:
@ -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);
|
||||
|
Reference in New Issue
Block a user