[MDEV-18437] Binlog logging Statement AND Row at the same time Created: 2019-01-31 Updated: 2019-05-20 Resolved: 2019-05-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration, Replication, Storage Engine - InnoDB |
| Affects Version/s: | 10.2.21 |
| Fix Version/s: | 10.2.25, 10.3.16, 10.4.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Pablo Guzmán | Assignee: | Andrei Elkin |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | log_bin, statement | ||
| Environment: |
Docker mariadb:10.2 running under Ubuntu 16.04 |
||
| Attachments: |
|
| Description |
|
We recently upgraded from MariaDB 10.1 to MariaDB 10.2.21 and we are facing a critical error in our replication schema. From our diagnosis, one transaction, when writing to binlog, is inserting one event in both formats, Mixed AND Statement. When the slave tries to duplicate the binary log it gets a "DUPLICATE PRIMARY KEY" in that transaction.
This error can be seen in this extract from the master's binary log (using mysqlbinlog -v option)
Update: Removing this behavior (Removing the Lock Tables and leaving it with just transactions) solved the issue. (Reading the documentation it seems when you issue LOCK TABLES the active transaction should be closed, it seems that behavior it's acting oddly) |
| Comments |
| Comment by Daniel Ragle [ 2019-04-24 ] |
|
I added a test case reduction over on: https://jira.mariadb.org/browse/MDEV-19158 but now think my report may be better suited here, as the duplicate RBR and Statement in the binary log is exactly what I am seeing as well. I'm seeing this behavior in 10.3.14. In my case, the following all appear to be required:
The final INSERT of T3 is where the error in the binary log occurs for me. In my case all the tables are MyISAM, so no TRANSACTION statements are in play. t2 is locked implicitly; but even if you add it directly to the LOCK statement you still get the errant behavior. |
| Comment by Sujatha Sivakumar (Inactive) [ 2019-05-20 ] |
|
This issue is a duplicate of |