Hi Baron,
It may be a single network packet, but all application packets are
in there. For me, the single network packet is:
A: 0100 0001 0127 0000 0203 6465 .....'....de
B: 6600 0000 1140 4076 6572 7369 6f6e 5f63 f....@@version_c
C: 6f6d 6d65 6e74 000c 0800 1c00 0000 fd01 omment..........
D: 001f 0000 0500 0003 fe00 0002 001d 0000 ................
E: 041c 4d79 5351 4c20 436f 6d6d 756e 6974 ..MySQL.Communit
F: 7920 5365 7276 6572 2028 4750 4c29 0500 y.Server.(GPL)..
G: 0005 fe00 0002 00 .......
If we break this down into application packets, we'll get the five
packets below. Note the query was packet #0, and the formatting below
is setup to match the offsets in the packet above.
Result Set Header Packet: 1 byte, packet #1, 1 column
A: 0100 0001 01 .....
Field Packet: 39 bytes (0x27), packet #2
A: 27 0000 0203 6465 .....'....de
B: 6600 0000 1140 4076 6572 7369 6f6e 5f63 f....@@version_c
C: 6f6d 6d65 6e74 000c 0800 1c00 0000 fd01 omment..........
D: 001f 0000 ....
EOF Packet: 5 bytes, packet #3
D: 0500 0003 fe00 0002 00 ...........
Row Data Packet: 29 bytes (0x1d), packet #4
D: 1d 0000 .....
E: 041c 4d79 5351 4c20 436f 6d6d 756e 6974 ..MySQL.Communit
F: 7920 5365 7276 6572 2028 4750 4c29 y.Server.(GPL)
EOF Packet: 5 bytes, packet #5
F: 0500 ..
G: 0005 fe00 0002 00 .......
Hope this helps!
-Eric
On Sun, Apr 12, 2009 at 09:36:32AM -0400, Baron Schwartz wrote:
> Another interesting thing I'm seeing -- it looks to me like the server
> replies with a single packet to "select @@version_comment limit 1"
> instead of
>
> "The order of packets for a result set is:
>
> (Result Set Header Packet) the number of columns
> (Field Packets) column descriptors
> (EOF Packet) marker: end of Field Packets
> (Row Data Packets) row contents
> (EOF Packet) marker: end of Data Packets"
>
> The single packet contains the column definition AND the row data.
> Comments on that?
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals?unsub=1