use of io.mycat.net.mysql.ResetPacket in project Mycat-Server by MyCATApache.
the class ServerPrepareHandler method reset.
@Override
public void reset(byte[] data) {
ResetPacket packet = new ResetPacket();
packet.read(data);
long pstmtId = packet.getPstmtId();
PreparedStatement pstmt = pstmtForId.get(pstmtId);
if (pstmt != null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("reset prepare sql : " + pstmtForId.get(pstmtId));
}
pstmt.resetLongData();
source.write(OkPacket.OK);
} else {
source.writeErrMessage(ErrorCode.ERR_FOUND_EXCEPION, "can not reset prepare statement : " + pstmtForId.get(pstmtId));
}
}
Aggregations