[MDEV-18745] DDL Algorithm <> Copy could break row based replication Created: 2019-02-26 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Replication, Storage Engine - InnoDB |
| Affects Version/s: | 10.4.3, 10.3.14 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Matthias Leich | Assignee: | Andrei Elkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | alter-replication | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Problem found during RQG testing involving row based replication.
|
| Comments |
| Comment by Marko Mäkelä [ 2019-02-26 ] |
|
The problem does occur with LOCK=SHARED, but ALGORITHM=FORCE (rebuilding the table natively inside InnoDB) makes the problem disappear. I do not understand why we would possibly get the duplicate key error for (col1=5,col_c='3333333333'). I do not see any update of col1. And why should the updates of col2 affect this at all? I suspect that this is a problem with replication, not with InnoDB. Elkin, I would suggest you to check what gets passed to ha_innobase::write_row() and ha_innobase::update_row() on the slave. If you think that it is an InnoDB problem, then please provide some log of statements or preferrably a test case that does not involve replication. |
| Comment by Andrei Elkin [ 2019-02-27 ] |
|
It all looks the row-based formatting issue. When a query is reconstructed from the rows-event image it passes UPDATE `test`.`t1` to OK. I am investigating further. |
| Comment by Andrei Elkin [ 2019-02-28 ] |
|
Now it's confirmed to be RBR issue, and specifically a wrong index is chosen for locating the being updated record, which happens to be not unique. |
| Comment by Andrei Elkin [ 2019-02-28 ] |
|
More specifically there's an issue in Rows_log_event::find_key() that did not check whether the actual key value |