use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.
the class FetchStoreNodeOfChildTableHandler method errorResponse.
@Override
public void errorResponse(byte[] data, BackendConnection conn) {
finished.incrementAndGet();
ErrorPacket err = new ErrorPacket();
err.read(data);
LOGGER.info("errorResponse " + err.getErrNo() + " " + new String(err.getMessage()));
if (canReleaseConn()) {
conn.release();
}
}
use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.
the class MultiNodeDdlHandler method connectionError.
@Override
public void connectionError(Throwable e, BackendConnection conn) {
LOGGER.info("backend connect", e);
ErrorPacket errPacket = new ErrorPacket();
errPacket.setPacketId(++packetId);
errPacket.setErrNo(ErrorCode.ER_ABORTING_CONNECTION);
errPacket.setMessage(StringUtil.encode(e.toString(), session.getSource().getCharset().getResults()));
err = errPacket;
executeConnError(conn);
}
use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.
the class PacketUtil method getShutdown.
public static ErrorPacket getShutdown() {
ErrorPacket error = new ErrorPacket();
error.setPacketId(1);
error.setErrNo(ErrorCode.ER_SERVER_SHUTDOWN);
error.setMessage("The server has been shutdown".getBytes());
return error;
}
Aggregations