Esempio n. 1
0
//This sends the error to the client.
func sendError(sendReply mysqlctl.SendUpdateStreamResponse, reqIdentifier string, inputErr error, blpPos *mysqlctl.BlPosition) {
	var err error
	streamBuf := new(mysqlctl.BinlogResponse)
	streamBuf.Error = inputErr.Error()
	if blpPos != nil {
		streamBuf.BlPosition = *blpPos
	}
	buf := []*mysqlctl.BinlogResponse{streamBuf}
	err = sendStream(sendReply, buf)
	if err != nil {
		relog.Error("Error in communicating message %v with the client: %v", inputErr, err)
	}
}