Commit 43ea3d25 authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-21365: Check $MARIADB_HOME/my.cnf in addition to $MYSQL_HOME/my.cnf

Currently for the server, we only check if $MYSQL_HOME is set. Added a check
if $MARIADB_HOME is set and try to read the configuration file from this
directory. If $MARIADB_HOME is NULL, only then check $MYSQL_HOME.
parent 81b5e7dd
...@@ -1051,8 +1051,17 @@ static const char **init_default_directories(MEM_ROOT *alloc) ...@@ -1051,8 +1051,17 @@ static const char **init_default_directories(MEM_ROOT *alloc)
#endif #endif
if ((env= getenv("MYSQL_HOME"))) /*
If value of $MARIADB_HOME environment variable name is NULL, check
for $MYSQL_HOME
*/
if ((env= getenv("MARIADB_HOME")))
errors += add_directory(alloc, env, dirs); errors += add_directory(alloc, env, dirs);
else
{
if ((env= getenv("MYSQL_HOME")))
errors += add_directory(alloc, env, dirs);
}
/* Placeholder for --defaults-extra-file=<path> */ /* Placeholder for --defaults-extra-file=<path> */
errors += add_directory(alloc, "", dirs); errors += add_directory(alloc, "", dirs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment