use of io.mycat.net.mysql.LongDataPacket in project Mycat-Server by MyCATApache.
the class ServerPrepareHandler method sendLongData.
@Override
public void sendLongData(byte[] data) {
LongDataPacket packet = new LongDataPacket();
packet.read(data);
long pstmtId = packet.getPstmtId();
PreparedStatement pstmt = pstmtForId.get(pstmtId);
if (pstmt != null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("send long data to prepare sql : " + pstmtForId.get(pstmtId));
}
long paramId = packet.getParamId();
try {
pstmt.appendLongData(paramId, packet.getLongData());
} catch (IOException e) {
source.writeErrMessage(ErrorCode.ERR_FOUND_EXCEPION, e.getMessage());
}
}
}
Aggregations