Force MYSQL_HOME within the gateway

This commit is contained in:
Mark Riddoch
2013-07-22 15:06:54 +02:00
parent f2fe919089
commit 233b3afd81

View File

@ -231,7 +231,7 @@ int daemon_mode = 1;
sigset_t sigset;
int i, n, n_threads, n_services;
void **threads;
char buf[1024], *home, *cnf_file = NULL;
char mysql_home[1024], buf[1024], *home, *cnf_file = NULL;
char ddopt[1024];
#if defined(SS_DEBUG)
@ -248,6 +248,8 @@ char ddopt[1024];
if ((home = getenv("MAXSCALE_HOME")) != NULL)
{
sprintf(mysql_home, "%s/mysql", home);
setenv("MYSQL_HOME", mysql_home, 1);
sprintf(buf, "%s/etc/MaxScale.cnf", home);
if (access(buf, R_OK) == 0)
cnf_file = buf;