Merge branch '2.1' into develop

This commit is contained in:
Johan Wikman
2017-02-14 17:54:27 +02:00
46 changed files with 321 additions and 210 deletions

View File

@ -3664,7 +3664,12 @@ blr_start_slave(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
router->prevbinlog,
router->last_safe_pos);
/* Truncate previous binlog file to last_safe pos */
truncate(file, router->last_safe_pos);
if (truncate(file, router->last_safe_pos) == -1)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to truncate file: %d, %s",
errno, strerror_r(errno, err, sizeof(err)));
}
/* Log it */
MXS_WARNING("A transaction is still opened at pos %lu"