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

オープン 初心者向け
#95 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
cpp
領域
database

調査の方向性

まず Parallel_reader::Scan_ctx::copy_row() を見つけ、rec_offs_size(offsets)、rec_offs_data_size(offsets)、rec_offs_extra_size(offsets) がコピーする範囲をどのように決定するかを調べます。ロジックを、issue で参照されている upstream MySQL commit と比較します。完了条件は、buffer が正しいソース範囲から完全なレコードを受け取ることです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C++
スター
338
フォーク
235
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenTenBase/TXSQL のほかの issue

OpenTenBase/TXSQL の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。