Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bug#39033858 Parallel_reader::Scan_ctx::copy_row copies wrong range of bytes

Open Beginner friendly
#95 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp
Domain
database

Research direction

Start by locating Parallel_reader::Scan_ctx::copy_row() and inspect how rec_offs_size(offsets), rec_offs_data_size(offsets), and rec_offs_extra_size(offsets) determine the copied range. Compare the logic with the upstream MySQL commit referenced in the issue; done means the buffer receives the complete record from the correct source range.

Written by the indexing model from the issue text.

Description

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
https://github.com/Wen-He/TXSQL/commit/52de0a885eb1bbfdaa1f03f5352419a124c8f419

Upstream Reference
https://github.com/mysql/mysql-server/commit/c4148fad113945e51b1a44e88a798e87216a7c3b

Dominant language
C++
Stars
338
Forks
235
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenTenBase/TXSQL

All issues in OpenTenBase/TXSQL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.