OpenTenBase / OpenTenBase/TXSQL
Bug#39033858 Parallel_reader::Scan_ctx::copy_row copies wrong range of bytes
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 337
- Fork
- 234
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tìm Parallel_reader::Scan_ctx::copy_row() và kiểm tra cách rec_offs_size(offsets), rec_offs_data_size(offsets) và rec_offs_extra_size(offsets) xác định phạm vi được sao chép. So sánh logic này với upstream MySQL commit được tham chiếu trong issue; hoàn thành khi buffer nhận được bản ghi đầy đủ từ phạm vi nguồn chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- database
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100