Section 11.1.1. ("Introduction",
http://dev.mysql.com/doc/internals/en/myisam-introduction.html ) uses the
following example for a MyISAM dynamic row:
03, 00 start of header
04 actual length
0c unused length
01, fc flags + overflow pointer
**** data in the row
************ unused bytes
<-- next row starts here)
However, the "start of header" is actually only the first byte, 03. That
means that the next two bytes represent the actual length, and the next byte
after that is the unused length.
The notation "flags+overflow pointer" is also confusing. If an overflow
pointer were present (only in blocks of type 05,06,0b,0c, or 0d), it would
come before the flags, as the last 8 bytes of the header. There is no flag
for the overflow byte.
Finally, it isn't stated anywhere that there is no "deleted bit" in a dynamic
row. Thus, 8 nullable columns will only take one flag byte, where they
would require 2 bytes in a static table. Deletions are instead marked with a
block of type 0.
One question I still have: does "CREATE TABLE ( ... ) AVG_ROW_LENGTH=xxx"
actually do anything for MyISAM dynamic-row tables under MySQL 5? No matter
what settings I use, the minimum per-row size is 20 bytes, rows are aligned
on 4-byte boundaries, and overflow pointers are 8 bytes long.
--
David Lee Lambert ..... MA Comp Sci 2006 Wayne State
<as4109@stripped> or <lamber45@stripped> or +1 586-873-8813
Attachment: [application/pgp-signature]