mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Added checking for my.cnf file from environment variable MYSQL_HOME
instead of DATADIR. include/config-win.h: Added checks for environment variable MYSQL_HOME libmysql/Makefile.shared: Added checks for environment variable MYSQL_HOME mysys/Makefile.am: Added checks for environment variable MYSQL_HOME mysys/default.c: Removed checks for my.cnf file in datadir, instead added checking if my.cnf exists in environment variable MYSQL_HOME scripts/mysqld_multi.sh: Added checks for my.cnf file in environment variable MYSQL_HOME, if exists. scripts/mysqld_safe.sh: Added checks for my.cnf file in environment variable MYSQL_HOME, if exists.
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