Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-30046 wrong row targeted with "insert ... on duplicate" and "rep…
…lace" When HA_DUPLICATE_POS is not supported, the row to replace was navigated by ha_index_read_idx_map, which uses only hash to navigate. Suchwise, given a hash collision it may choose an incorrect row. handler::position would be correct and very convenient to use here. The code is updated to set dup_ref by a handler independently of engine capabilities, when extra lookup is made (for long unique or something else, for example WITHOUT OVERLAPS) REPLACE works correctly with this regard, however there are other cases yet uncovered: LOAD DATA and replication with IDEMPOTENT mode. They will be fixed by a follow-up, after refactoring.
- Loading branch information
1 parent
e1876e7
commit a057a08
Showing
3 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters