Fix for bug MXS-289

Added fix for bug MXS-289
This commit is contained in:
MassimilianoPinto 2015-07-27 18:44:05 +02:00
parent 6a92a419ff
commit 556e99b2a9
3 changed files with 5 additions and 5 deletions

View File

@ -618,7 +618,7 @@ ROUTER_SLAVE *slave = (ROUTER_SLAVE *)router_session;
LOGFILE_MESSAGE,
"%s: Master %s disconnected after %ld seconds. "
"%d events read,",
router->service->name, router->master->remote,
router->service->name, router->service->dbref->server->name,
time(0) - router->connect_time, router->stats.n_binlogs_ses)));
LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR,
@ -1122,7 +1122,7 @@ char msg[85], *errmsg;
LOGFILE_MESSAGE,
"%s: Master %s disconnected after %ld seconds. "
"%d events read.",
router->service->name, router->master->remote,
router->service->name, router->service->dbref->server->name,
time(0) - router->connect_time, router->stats.n_binlogs_ses)));
blr_master_reconnect(router);
}

View File

@ -157,7 +157,7 @@ GWBUF *buf;
LOGIF(LM,(skygw_log_write(
LOGFILE_MESSAGE,
"%s: attempting to connect to master server %s.",
router->service->name, router->master->remote)));
router->service->name, router->service->dbref->server->name)));
router->connect_time = time(0);
if (setsockopt(router->master->fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive , sizeof(keepalive )))
@ -587,7 +587,7 @@ char query[128];
"%s: Request binlog records from %s at "
"position %d from master server %s.",
router->service->name, router->binlog_name,
router->binlog_position, router->master->remote)));
router->binlog_position, router->service->dbref->server->name)));
break;
case BLRM_BINLOGDUMP:
// Main body, we have received a binlog record from the master

View File

@ -809,7 +809,7 @@ int len, actual_len, col_len, seqno, ncols, i;
strncpy((char *)ptr, column, col_len); // Result string
ptr += col_len;
sprintf(column, "%s", router->master->remote ? router->master->remote : "");
sprintf(column, "%s", router->service->dbref->server->name ? router->service->dbref->server->name : "");
col_len = strlen(column);
*ptr++ = col_len; // Length of result string
strncpy((char *)ptr, column, col_len); // Result string