mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Added /etc/mysql to my.cnf search path after /etc.
bug #25104 mysys/default.c: Added /etc/mysql to the search path after /etc. scripts/mysqld_multi.sh: Added /etc/mysql to the my.cnf search path. Changed chop to chomp - since it's smarter.
This commit is contained in:
parent
58b4c4bf1d
commit
8257db67f3
2 changed files with 15 additions and 5 deletions
|
@ -979,10 +979,11 @@ static uint my_get_system_windows_directory(char *buffer, uint size)
|
|||
|
||||
Everywhere else, this is:
|
||||
1. /etc/
|
||||
2. getenv(DEFAULT_HOME_ENV)
|
||||
3. ""
|
||||
4. "~/"
|
||||
5. --sysconfdir=<path>
|
||||
2. /etc/mysql/
|
||||
3. getenv(DEFAULT_HOME_ENV)
|
||||
4. ""
|
||||
5. "~/"
|
||||
6. --sysconfdir=<path>
|
||||
|
||||
*/
|
||||
|
||||
|
@ -1008,6 +1009,7 @@ static void init_default_directories()
|
|||
*ptr++= env;
|
||||
#endif
|
||||
*ptr++= "/etc/";
|
||||
*ptr++= "/etc/mysql/";
|
||||
#endif
|
||||
if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV))))
|
||||
*ptr++= env;
|
||||
|
|
|
@ -472,6 +472,14 @@ sub find_groups
|
|||
{
|
||||
$data[$i] = $line;
|
||||
}
|
||||
if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
|
||||
{
|
||||
open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
|
||||
}
|
||||
for (; ($line = shift @tmp); $i++)
|
||||
{
|
||||
$data[$i] = $line;
|
||||
}
|
||||
if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" &&
|
||||
-r "$ENV{MYSQL_HOME}/my.cnf")
|
||||
{
|
||||
|
@ -491,7 +499,7 @@ sub find_groups
|
|||
$data[$i] = $line;
|
||||
}
|
||||
}
|
||||
chop @data;
|
||||
chomp @data;
|
||||
# Make a list of the wanted group ids
|
||||
if (defined($raw_gids))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue