Bug #68405 Length encoded integer defines overlapping intervals for 2 / 3 byte ints.
Submitted: 16 Feb 2013 22:57 Modified: 4 Mar 2013 16:59
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[16 Feb 2013 22:57] Roland Bouman
At http://dev.mysql.com/doc/internals/en/overview.html#length-encoded-integer it reads:

* if the value is >= 251 and < (2^16), it is stored as fc + 2-byte integer
* if the value is >= (2^16-1) and < (2^24), it is stored as fd + 3-byte integer

If this were true, than a value of 2^16-1 would fall in both these categories, since 2^16-1 is less than 2^16 (upper boundary of 2 byte int) and is also equal to 2^16 -1 (documented lower boundary of 3 byte int).

It seems to me it should read:

* if the value is >= (2^16) and < (2^24), it is stored as fd + 3-byte integer

How to repeat:
Read doc. Observe problem described above.

Suggested fix:
Correct doc. Fix problem described above.
[4 Mar 2013 16:59] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.