OpenTenBase / OpenTenBase/TXSQL
Bug#39033858 Parallel_reader::Scan_ctx::copy_row copies wrong range of bytes
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 337
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando Parallel_reader::Scan_ctx::copy_row() e verifica come rec_offs_size(offsets), rec_offs_data_size(offsets) e rec_offs_extra_size(offsets) determinano l’intervallo copiato. Confronta la logica con il commit upstream di MySQL citato nell’issue; il lavoro è completato quando il buffer riceve il record completo dall’intervallo di origine corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- database
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 68/100