Skip to content

Commit

Permalink
[DNM]debug invalid ssl buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
TangSiyang2001 committed Jul 29, 2024
1 parent c7fc347 commit 1c7bc9a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ public ByteBuffer fetchOnePacket() throws IOException {
}
int mysqlPacketLength = (header[0] & 0xFF) | ((header[1] & 0XFF) << 8) | ((header[2] & 0XFF) << 16);
// remove mysql packet header
if (result.limit() == 0) {
LOG.warn("result buffer invalid: limit=0, position={}, mysqlPacketLen={}, packetLen={},"
+ "readLen={}, isSslMode=true, isSslHandShake={}, sslHeaderbuf={}",
result.position(), mysqlPacketLength, packetLen, readLen, isSslHandshaking, sslHeaderByteBuffer.array());
}
result.position(4);
result.compact();
// when encounter large sql query, one mysql packet will be packed as multiple ssl packets.
Expand Down

0 comments on commit 1c7bc9a

Please sign in to comment.