OpenTenBase / OpenTenBase/TXSQL

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

未关闭 适合新手
#95 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
338
派生
235
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 Parallel_reader::Scan_ctx::copy_row() 并检查 rec_offs_size(offsets)、rec_offs_data_size(offsets) 和 rec_offs_extra_size(offsets) 如何确定复制范围。将该逻辑与 issue 中引用的上游 MySQL commit 进行比较;完成的标准是 buffer 从正确的源范围接收完整记录。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
database
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
描述清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。