Commit 72429ca
committed
MDEV-30046 wrong row targeted with "insert ... on duplicate" and "replace"
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. dup_ref is already set by handler independently of the engine capabilities, when an extra lookup is made (for long unique or something else, for example WITHOUT OVERLAPS) such error will be indicated by file->lookup_errkey != -1.1 parent 7f161a5 commit 72429ca
File tree
5 files changed
+63
-8
lines changed- mysql-test/main
- sql
5 files changed
+63
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
677 | 696 | | |
678 | 697 | | |
679 | 698 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
658 | 673 | | |
659 | 674 | | |
660 | 675 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4569 | 4569 | | |
4570 | 4570 | | |
4571 | 4571 | | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
4572 | 4578 | | |
4573 | 4579 | | |
4574 | 4580 | | |
| |||
6996 | 7002 | | |
6997 | 7003 | | |
6998 | 7004 | | |
6999 | | - | |
7000 | | - | |
7001 | | - | |
7002 | | - | |
7003 | | - | |
| 7005 | + | |
| 7006 | + | |
7004 | 7007 | | |
7005 | 7008 | | |
7006 | 7009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3464 | 3464 | | |
3465 | 3465 | | |
3466 | 3466 | | |
| 3467 | + | |
3467 | 3468 | | |
3468 | 3469 | | |
3469 | 3470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1884 | 1884 | | |
1885 | 1885 | | |
1886 | 1886 | | |
1887 | | - | |
| 1887 | + | |
1888 | 1888 | | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
1889 | 1901 | | |
1890 | | - | |
1891 | | - | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1892 | 1909 | | |
1893 | 1910 | | |
1894 | 1911 | | |
| |||
0 commit comments