The Packet Header MySQL

Bytes Name
----- ----
3 Packet Length
1 Packet Number

Packet Length: The length, in bytes, of the packet that follows the Packet Header. There may be some special values in the most significant byte. Since 2**24 = 16MB, the maximum packet length is 16MB.

Packet Number: A serial number which can be used to ensure that all packets are present and in order. The first packet of a client query will have Packet Number = 0. Thus, when a new SQL statement starts, the packet number is re-initialised.

The Packet Header will not be shown in the descriptions of packets that follow this section. Think of it as always there. But logically, it "precedes the packet" rather than "is included in the packet".

Alternative terms: Packet Length is also called "packetsize". Packet Number is also called "Packet no".


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

MySQL Topics