diff --git a/server/modules/routing/binlog/blr.c b/server/modules/routing/binlog/blr.c index 9cb33a0ce..df0d3174d 100644 --- a/server/modules/routing/binlog/blr.c +++ b/server/modules/routing/binlog/blr.c @@ -388,6 +388,7 @@ char task_name[BLRM_TASK_NAME_LEN+1] = ""; else if (strcmp(options[i], "master_uuid") == 0) { inst->set_master_uuid = strdup(value); + inst->master_uuid = inst->set_master_uuid; } else if (strcmp(options[i], "master_version") == 0) { @@ -1329,7 +1330,8 @@ int len; return NULL; memcpy(rval, (char *)(errpkt->start) + 7, 6); rval[6] = ' '; - memcpy(&rval[7], (char *)(errpkt->start) + 13, len - 8); + /* message size is len - (1 byte field count + 2 bytes errno + 6 bytes status) */ + memcpy(&rval[7], (char *)(errpkt->start) + 13, len - 9); rval[len-2] = 0; return rval; }