[MDEV-30557] Adding invisible SERIAL column primary key on slave break row base replication Created: 2023-02-03 Updated: 2023-02-26 Resolved: 2023-02-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.6.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | VAROQUI Stephane | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Hello The table with composed primary key compose on 3 varchar(256) we alter it on a replica to add invisible serial and move the primary to unique and this break the replicas on row based event
I would suggest that if a column is invisible it should be ignored from the replica in mapping a row event array to column name of the table when the event have less column count than the destination columns I think it may not be a bug but a documentation issue as what about auto_increment if it is affected on the replica than it's not on the leader and would produce data divergence |
| Comments |
| Comment by Sergei Golubchik [ 2023-02-24 ] |
|
This behaves as expected. Documentation says that
And you have added a column first, not last. Replication cannot ignore invisible columns, because in that case tables with invisible columns cannot be replicated at all. |
| Comment by VAROQUI Stephane [ 2023-02-26 ] |
|
Thanks pointing out the documentation in the hope it will help others as well |