The result is made up of multiple packets, and the first packet is
the number of columns. For example, if you see:
01 00 00 01 0d
The packet is 1 byte long, has a packet number of 1 (first packet in
response), and the payload of the packet is 0d, or 13, which represents
the number of columns in this particular result set. You then get a
number of packets for each column header information and row.
On Mon, Dec 14, 2009 at 09:48:51AM -0800, Eric DeFriez wrote:
> according to:
> the first 3 bytes of the response from server to client is the length
> of the mysql packet, however from my own investigations (mysql 5.0.37
> with innodb) the response packet to any query ("select ...") is always
> hex "01 00 00" regardless of the length of the mysql response packet.
> some executions (like "use <database>" or "set autocommit=0") do get
> mysql to return a legitimate length ("07 00 00") however any query i
> execute where i expect data rows to be returned the length is never
> anyone know what the problem is?
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals?unsub=1