Merge branch '2.2' into develop

This commit is contained in:
Johan Wikman
2018-03-12 14:38:37 +02:00
14 changed files with 267 additions and 112 deletions

View File

@ -179,6 +179,18 @@ MYSQL *mxs_mysql_real_connect(MYSQL *con, SERVER *server, const char *user, cons
mysql_optionsv(con, MYSQL_OPT_RECONNECT, &yes);
mysql_optionsv(con, MYSQL_INIT_COMMAND, "SET SQL_MODE=''");
MXS_CONFIG* config = config_get_global_options();
if (config->local_address)
{
if (mysql_optionsv(con, MYSQL_OPT_BIND, config->local_address) != 0)
{
MXS_ERROR("'local_address' specified in configuration file, but could not "
"configure MYSQL handle. MaxScale will try to connect using default "
"address.");
}
}
MYSQL* mysql = mysql_real_connect(con, server->name, user, passwd, NULL, server->port, NULL, 0);
if (mysql)