Re: 652e9ee405e: MDEV-30046 wrong row targeted with "insert ... on duplicate" and "replace"
Hi, Nikita, Good fix. Ok to push, thanks On Apr 29, Nikita Malyavin wrote:
revision-id: 652e9ee405e (mariadb-10.5.24-174-g652e9ee405e) parent(s): 3d417476256 author: Nikita Malyavin committer: Nikita Malyavin timestamp: 2024-04-27 21:08:21 +0200 message:
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. 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)
Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org
Hi, Nikita, Sorry, forgot to add. Nice fix, but it still needs a test case. On Apr 29, Sergei Golubchik wrote:
Hi, Nikita,
Good fix. Ok to push, thanks
On Apr 29, Nikita Malyavin wrote:
revision-id: 652e9ee405e (mariadb-10.5.24-174-g652e9ee405e) parent(s): 3d417476256 author: Nikita Malyavin committer: Nikita Malyavin timestamp: 2024-04-27 21:08:21 +0200 message:
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. 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)
Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org
participants (1)
-
Sergei Golubchik