OpenTenBase / OpenTenBase/TXSQL
Bug#39033858 Parallel_reader::Scan_ctx::copy_row copies wrong range of bytes
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 337
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza localizando Parallel_reader::Scan_ctx::copy_row() e inspecciona cómo rec_offs_size(offsets), rec_offs_data_size(offsets) y rec_offs_extra_size(offsets) determinan el rango copiado. Compara la lógica con el commit de upstream MySQL referenciado en el issue; se considera terminado cuando el buffer recibe el registro completo del rango de origen correcto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp
- Área
- database
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Tranquilo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 68/100