Each index record contains a five-byte header that may be preceded by a variable-length header. The header is used to link together consecutive records, and also in row-level locking.
每个索引记录包含一个五字节的头,在它之前还有一个变长的头。这个头是用来连接连续的记录,也用于行级锁。
The record header contains a bit vector for indicating NULL columns. The bit vector occupies (n_nullable+7)/8 bytes. Columns that are NULL will not occupy other space than the bit in this vector.
记录头包含一个位向量,用来指明空列。位向量占用了(可空的列数+7)/8字节。值为空的列不会再占用此位向量以外的空间。
For each non-NULL variable-length field, the record header contains the length of the column in one or two bytes. Two bytes will only be needed if part of the column is stored externally or the maximum length exceeds 255 bytes and the actual length exceeds 127 bytes.
对于每个非空的变长字段,记录头使用一或两个字节包含了列的长度。只有如下情况才会用到两个字节:字段的值保存在外部;或者字段的最大长度走过了255,并且实际的字段值超过了127字节。