[MDEV-25606] Concurrent CREATE TRIGGER statements mix up in binlog and break replication Created: 2021-05-05 Updated: 2022-10-20 Resolved: 2021-05-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication, Triggers |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.5.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The test case is non-deterministic and for reproducing purposes only, not suitable for the regression suite.
It very quickly ends up with something like this in the binary log:
which naturally makes the replication fail with
There was some problem with this on 10.2, but nothing bad happens on 10.3-10.6. However, on bb-10.6-monty starting from the patch below it fails very reliably.
|
| Comments |
| Comment by Michael Widenius [ 2021-05-10 ] |
|
The reason for this is that we don't have a a lock on the trigger name, so it is possible for There is also a possibility for a problem with DROP TRIGGER:
|
| Comment by Michael Widenius [ 2021-05-10 ] |
|
I have given Elana a patch to test that fixes both drop and create |
| Comment by Michael Widenius [ 2021-05-10 ] |
|
The fix uses now code that only exists in 10.5 and up. |
| Comment by Michael Widenius [ 2021-05-10 ] |
|
Fixed by adding a mdl lock for the trigger name |