From 7e1b289a2993c0601d5a8d75d03824e3dad0cec4 Mon Sep 17 00:00:00 2001 From: Maqbool Date: Wed, 28 Oct 2026 21:45:51 +0400 Subject: [PATCH] Fix superscripts lost in the vendored protocol docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The HTML-to-markdown conversion dropped tags, so powers of two became their digits run together. The length-encoded integer table read "251 | 216", "216 | 224", "224 | 264" — those bounds are 2^16, 2^24 and 2^64. Taken literally the table produces a broken int codec, which is the next thing phase 1 builds. Same damage in the packet splitting rule and the compressed packet page, where 2^24-1 had become 224-1. Found by re-running the conversion with and mapped to ^n and _n, then diffing; these three pages are the only ones affected out of 78. --- .../page_protocol_basic_compression_packet.md | 2 +- docs/mysql-protocol/page_protocol_basic_dt_integers.md | 6 +++--- docs/mysql-protocol/page_protocol_basic_packets.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/mysql-protocol/page_protocol_basic_compression_packet.md b/docs/mysql-protocol/page_protocol_basic_compression_packet.md index 52acd6d..5802ac4 100644 --- a/docs/mysql-protocol/page_protocol_basic_compression_packet.md +++ b/docs/mysql-protocol/page_protocol_basic_compression_packet.md @@ -140,7 +140,7 @@ c0 c0 62 94 48 32 00 ea 67 05 eb 07 00 8d f9 1c ..b.H2..g....... **Definition:** jit_executor_value.cc:373 Note - sending a MySQL Packet of the size 224-5 to 224-1 via compression leads to at least one extra compressed packet. If the uncompressed MySQL Packet is like + sending a MySQL Packet of the size 2^24-5 to 2^24-1 via compression leads to at least one extra compressed packet. If the uncompressed MySQL Packet is like fe ff ff 03 ... -- [length](https://dev.mysql.com/doc/dev/mysql-server/latest/namespacegis.html#a1e3bf735dbe640151561b282f0f4dba5) = 2^24-2, [sequence](https://dev.mysql.com/doc/dev/mysql-server/latest/udf__example_8cc.html#aa48a6c218d5a51dadae7378c4e83c109) id = 3 diff --git a/docs/mysql-protocol/page_protocol_basic_dt_integers.md b/docs/mysql-protocol/page_protocol_basic_dt_integers.md index 36dc64a..5c6f334 100644 --- a/docs/mysql-protocol/page_protocol_basic_dt_integers.md +++ b/docs/mysql-protocol/page_protocol_basic_dt_integers.md @@ -32,9 +32,9 @@ To convert a number value into a length-encoded integer: | Greater or equal | Lower than | Stored as | | --- | --- | --- | | 0 | 251 | 1-byte integer | -| 251 | 216 | 0xFC + 2-byte integer | -| 216 | 224 | 0xFD + 3-byte integer | -| 224 | 264 | 0xFE + 8-byte integer | +| 251 | 2^16 | 0xFC + 2-byte integer | +| 2^16 | 2^24 | 0xFD + 3-byte integer | +| 2^24 | 2^64 | 0xFE + 8-byte integer | Similarly, to convert a length-encoded integer into its numeric value check the first byte. diff --git a/docs/mysql-protocol/page_protocol_basic_packets.md b/docs/mysql-protocol/page_protocol_basic_packets.md index 39ee8fb..f860852 100644 --- a/docs/mysql-protocol/page_protocol_basic_packets.md +++ b/docs/mysql-protocol/page_protocol_basic_packets.md @@ -4,7 +4,7 @@ Source: