tablecodec: fix write wrong prefix index value when collation is ascii_bin/latin1_bin (#24578)#24680
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
/run-all-tests |
|
@lysu you're already a collaborator in bot's repo. |
|
/lgtm |
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by writing |
|
@sticnarf CI seems back to green, please help merge again if free ~ :) |
|
@sticnarf: Thanks for your review. The bot only counts DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
To my understanding, only the release manager can merge the PRs into release branches. |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: e15f879 |
cherry-pick #24578 to release-5.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/24680After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Issue Number:
close #24569
info #24548 (only address #24548 (comment), mainly issue seems have some other problem in tikv side)
Problem Summary:
prefix index will truncate value during insert, but for not utf8 collation, the code is wrong, it change type from string to bytes when handing truncate value to prefix len, at last, encode key will treat it as bytes and miss handling collation's trim space logic.
this issue need:
the question maybe meet:
What is changed and how it works?
What's Changed, How it Works:
set it as string type if before truncating it's string type.
Related changes
Check List
Tests
Side effects
Release note