Problem:
InnoDB uses a convention where rec pointers point in between two
fragments of the record: to the left of it, are so called "extra"
bytes which contain metadata such as flags, info about which fields are
null and what is their length. To the right of it, is the actual data of
the fields.
The function rec_offs_size(offsets) returns the total length of the
record which is the sum of these two:
rec_offs_data_size(offsets) + rec_offs_extra_size(offsets)
The logic of Parallel_reader::Scan_ctx::copy_row() copied that many
bytes into a freshly allocated buffer, but used rec address as the
source, instead of "rec - extra", resulting in copying wrong range of
bytes.
Solution:
Adjust the logic to copy the correct range of bytes.
Change-Id: Ia0463e4a752dfce70ff5a2ac83818132de9a638c
Commit
Wen-He@52de0a8
Upstream Reference
mysql/mysql-server@c4148fa
Problem:
InnoDB uses a convention where rec pointers point in between two
fragments of the record: to the left of it, are so called "extra"
bytes which contain metadata such as flags, info about which fields are
null and what is their length. To the right of it, is the actual data of
the fields.
The function rec_offs_size(offsets) returns the total length of the
record which is the sum of these two:
The logic of Parallel_reader::Scan_ctx::copy_row() copied that many
bytes into a freshly allocated buffer, but used rec address as the
source, instead of "rec - extra", resulting in copying wrong range of
bytes.
Solution:
Adjust the logic to copy the correct range of bytes.
Change-Id: Ia0463e4a752dfce70ff5a2ac83818132de9a638c
Commit
Wen-He@52de0a8
Upstream Reference
mysql/mysql-server@c4148fa