I have known for some times that there is an interesting improvement in MySQL 8.0.17 regarding GTID Crash Safety, but I have not had the time nor the need to look into it before. When writing my last post (Understanding MySQL Replication "fatal error 1236": [...]), I saw something interesting related to this, and it is now time to cover this on my blog. From my point of view, this change is very interesting, but the documentation about it should be improved (and more), so there will be bug reports. Let's explore all this.
Tuesday, August 4, 2026
MySQL 8.0.17 GTID Crash Safety Improvement
Monday, August 3, 2026
Understanding MySQL Replication "fatal error 1236": "Replica has more GTIDs than the source has, using the source's SERVER_UUID"
This MySQL replication error — fatal error 1236 / Replica has more GTIDs than the source has, using the source's SERVER_UUID — shows the importance of thinking before acting. I am glad a non-DBA Colleague asked me about it, because if he had restarted replication, it would have caused a much bigger mess.
Often, we are tempted — or pushed — to just restart things as quickly as possible. In this specific case, restarting replication is unsafe as it leads to a replication breakage in the best case, and to silent data corruption in the worse case. It is a great example of the following two advice : 1) do not make a bigger mess, do not failover, do not reboot, and 2) we cannot just bring the database back up, we have things to do first to make this safe. Let's explore all these.
Thursday, March 26, 2026
Binary Log Compression is Safe since MySQL 8.0.34
This is a quick one. My attention was recently brought (thanks Simon) on a relatively recent comment (25 Nov 2025) in Bug #103672 - Binlog compression transaction payload event exceeds max allowed packet :
The underlying server bug was fixed in 8.0.34 in BUG#33588473. The server now falls back to writing the transaction without compression, if the compressed size would exceed 1 GiB.
So Binary Log Transaction Compression is safe since MySQL 8.0.34. But this also means that it is unsafe before, as also clearly mentioned in Bug #103672 :
It is true that an 8.0.33 server (or older) will produce a corrupted binary log and that replicas may have to recover from backup. It would be better to document this clearly and to advise to not use compression on 8.0.33 and older.
However, even if updating the documentation is mentioned in the above quote, my quick check did not find any reference to the risk of using binlog compression before 8.0.34 (including in the documentation of the global variable binlog_transaction_compression). I thought this deserved wider knowledge, hence this post.
Wednesday, June 4, 2025
Interesting Troubleshooting of a MySQL Crash : filling then freeing the disk
I recently troubleshoot an interesting MySQL crash, and I think it is worth sharing (with the related bugs). MySQL crashed when the disk was full, you can see the free disk graph below. The Y-axis is in the tens of GiB scale and the X-axis is in the hour scale. Can you guess what happened ?
Monday, May 26, 2025
Interesting Binary Logging Optimization in MariaDB
As I wrote in a LinkedIn post, I am working on a blog post related to binary logging of big transactions. I thought I would split this post in two, so here is the first part where I cover the recent binary logging optimization in MariaDB and its unspoken advantage.
Monday, May 22, 2023
Avoiding a STOP SLAVE Crash with MTR in Percona Server older than 5.7.37-40
I am finalizing my Percona Live talk MySQL and Vitess (and Kubernetes) at HubSpot. In this talk, I mentioned that I like that Percona is providing better MySQL with Percona Server. This comes with a little inconvenience though: with improvements, sometimes comes regression. This post is about such regression and a workaround I implemented some time ago (I should have shared it earlier). This regression is fixed in Percona Server 5.7.37-40, so this is mostly interesting for historical purposes, or if you are running a Percona Server version older than that.
Tuesday, May 31, 2022
Triggering Replication Lag for Testing a Script
I am currently working on a script to auto-enable parallel replication / multi-threaded replication (MTR) when there is replication lag. For testing this script, I need to trigger replication lag that would disappear after enabling MTR. I came-up with a simple solution for that, and I thought it could be useful to more people, so I am writing this blog post about it. Read-on for the details.
Wednesday, January 19, 2022
Crashing MySQL with Malicious Intent and a lot of Determination
A year ago, I blogged about An Unprivileged User can crash your MySQL Server. At the time, I explained how to protect yourself against this problem. A few weeks ago, I revisited this vulnerability in a follow-up post in which I explained the fix, claimed that the MySQL 5.7 default configuration for Group Replication is still problematic, and explained a tuning to avoid the vulnerability. In this last post in the series, I explain how to exploit this vulnerability to crash older version of MySQL (or untuned Group Replication in 5.7), but this needs a lot of determination.
Tuesday, November 30, 2021
Follow-up on an Unprivileged User can Crash your MySQL Server
A year ago, I blogged about An Unprivileged User can Crash your MySQL Server. At the time, I presented how to protect yourself against this problem without explaining how to generate a crash. In this post, I am revisiting this vulnerability, not giving the exploit yet, but presenting the fix. Also, because the default configuration of Group Replication in 5.7 is still vulnerable (it is not in 8.0), I show the adjustment to make to avoid problems.
Monday, January 27, 2020
A Legacy Behavior of MySQL Corrupting Restored Backups (replicate-same-server-id = OFF)
Thursday, January 9, 2020
Puzzled by MySQL Replication (War Story)
Tuesday, July 16, 2019
MySQL Master Replication Crash Safety Part #5a: making things faster without reducing durability - using better hardware
Tuesday, July 9, 2019
MySQL Master Replication Crash Safety Part #4: benchmarks of high and low durability
Tuesday, February 26, 2019
MySQL Master High Availability and Failover: more thoughts
This is a great series, and I recommend its reading for everybody implementing master failover, with or without Orchestrator, even if you are not fully automating the process yet. Taking a step back, I realized that service discovery is only one of the five parts of a full MySQL Master Failover Strategy; this post is about these five parts. In some follow-up posts, I might analyze some deployments using the framework presented in this post.
Tuesday, February 12, 2019
MySQL Master Replication Crash Safety Part #3: GTID
Thursday, November 15, 2018
MySQL Master Replication Crash Safety Part #2: lagging slaves
Tuesday, October 30, 2018
On the consequences of sync_binlog != 1 (part #1)
Tuesday, October 23, 2018
Arg: relay_log_space_limit is (still) not dynamic !
Tuesday, September 11, 2018
Unforeseen use case of my GTID work: replicating from AWS Aurora to Google CloudSQL
The surprising part for me is that it uses my 4-year-old work for online migration to GTID with MySQL 5.6. This is a completely unforeseen use case of my work as I never thought that my hack would be useful after Oracle include an online migration path to GTID in MySQL 5.7 (Percona did something similar for MySQL 5.6).