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 ? Just to make sure we agree on the meaning of the graph above, let's describe it| J-F Gagné's MySQL Blog
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 pos...| jfg-mysql.blogspot.com
While doing benchmarks on 5.7 and 8.0, I came across a performance regression in MySQL 8.0 over 5.7 and opened a bug ( Bug #111353 : 3x Perf...| jfg-mysql.blogspot.com
I just submitted a MySQL Contribution and I would like to gather feedback about it. Depending on the received feedback, I might submit an updated contribution. The contribution is Counters for Slow InnoDB Sync Reads, and its goal is to make MySQL easier to operate on “complex” IO subsystems (like network drives in the cloud). The bug report / feature request Bug #117740 :| J-F Gagné's MySQL Blog
In the last weeks / months, I have been working on understanding / improving MySQL startup with many tables. I already wrote five posts on the subject, they are listed below. In this post, I use the knowledge we gained in the previous two posts to show the interest of tuning InnoDB Tablespace Duplicate Check Threads, making startup 30% in one case (2:28 vs. 3:33) and 5% in| J-F Gagné's MySQL Blog
I am writing this quick post to share what I think is a problematic new behavior of Offline Mode in MySQL 9. Basically, the new default behavior in MySQL 9 is to write the username of the user which set offline_mode to ON. I think this behavior has not been considered from a security point of view because it leaks a root username in the error message presented to the users. My| J-F Gagné's MySQL Blog
In the last weeks / months, I have been working on understanding / improving MySQL startup with many tables. I already wrote four posts on the subject, they are listed below. In this post, I use the system analysis of the previous post to revisit the light optimization on EBS volumes. With this analysis, I am able to determine why the previous tests did not show| J-F Gagné's MySQL Blog
This post is a little long, please bear with me as after the intro, you can skip to the essential.In the last weeks / months, I have been working on understanding / improving MySQL startup with many tables. I already wrote three posts on the subject, they are listed below. In this post, I focus on describing the startup phase InnoDB Tablespace Duplicate Check (Duplicate Check for| J-F Gagné's MySQL Blog
In the last weeks / months, I have been working on understanding / improving MySQL startup with many tables. I already wrote two posts on the subject, the links are below. So far, I did not share what brought my attention to this, and it is the subject of this post. Also, and because it is related, I come back to the optimization / contribution I already made on| J-F Gagné's MySQL Blog
I have been scratching my head about MySQL startup for some time. There is much to say about this, and many other posts will probably follow. For now, it is enough to know that with many tables (millions) the startup of MySQL 8.0+ (including 8.0, 8.4 and 9.0) is suboptimal (to say the least). With very little changes, I was able to speed it up, from 2:39 to 1:09 (1 minute and 9| J-F Gagné's MySQL Blog
When running tests, it is sometimes useful to slow down IOs to clearly show the impact of reading from the disk. Modern laptops and servers usually have fast local SSDs, and most cloud vendors provide, in addition to fast local disks, relatively fast network block devices (EBS for AWS and Persistent Disk for GCP). Even when using magnetic network block devices, IOs are not guaranteed| J-F Gagné's MySQL Blog
Yes, you read this correctly: because the MySQL client is insecure and allows running arbitrary commands, and because mysqldump blindly trusts the server it is dumping from, a hostile MySQL Server on which mysqldump is executed could trigger arbitrary command execution (also known as a remote code execution). This post raises awareness on this vulnerability and shows how a secure MySQL| J-F Gagné's MySQL Blog
A month ago, I announced that I am working on a MySQL Contribution to add database / schema in the slow query log file (bug report, LinkedIn, Twitter, Facebook, and MySQL Community Slack). My contribution is ready, and before submitting it, I would like feedback, so I am writing this post as a Request for Comments (RFC). If you are in a hurry, you can go directly to the RFC Fake PR.&| J-F Gagné's MySQL Blog
Yes, this is a catchy title, but it is true, and it got you reading this post :-). Another title could have been “Please load this mysql-dump: what could go wrong ?”. As you guessed, loading a dump is not a risk-free operation. In this post, I explain how the insecure MySQL client makes this operation risky and how to protect against it. And if you think this post is not| J-F Gagné's MySQL Blog
Not very long ago (well, maybe a little longer, this post is in draft for more than a year), in the spawn of less than 5 days, I suggested many colleagues to reproduce a problem they had with MySQL in a "more simple environment". Such more simple environment can be created with dbdeployer. dbdeployer is a tool to create "MySQL Sandboxes" on a Mac (laptop or desktop) or on Linux (vm,| J-F Gagné's MySQL Blog
A few days ago, Oracle released three new MySQL GA versions: 8.2.0, 8.0.35 and 5.7.44. I skimmed the release notes (8.2.0, 8.0.35 and 5.7.44), and I am not impressed. I guess that I would be even less impressed / more disappointed if I had checked in greater detail, and if I had reviewed the 8.1.0, 8.0.34 and 5.7.43 release notes. The subject of my disappointment is Oracle not| J-F Gagné's MySQL Blog
When trying to understand queries in the slow log, an interesting metric to look at is rows examined. Also, when trying to understand CPU spikes on a MySQL instance, the InnoDB Metric dml_reads and the global status Innodb_rows_read are interesting to check. In a similar way, when trying to gather information about which queries are loading the system, SUM_ROWS_EXAMINED from the| J-F Gagné's MySQL Blog
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| J-F Gagné's MySQL Blog
I just booked my travel arrangements for Percona Live 2023. In case you missed it, one of the most important MySQL Conference of the year is happening in Denver from Monday May 22 to Wednesday 24. I will be there and I am giving a talk about how HubSpot operates Percona Server / MySQL with Vitess in Kubernetes. My colleague, Mali Akmanalp, is also speaking about the tools we| J-F Gagné's MySQL Blog
In May 2020, I published a Planet for the MySQL Community Pluto Beta. I was satisfied with the result and was considering it done, but I did not invest the time to promote it to release (a non-beta site was running for a few months without being advertised). I finally came to it, and today I am happy to deprecate the beta and announce the release of Planet for the MySQL Community.&| J-F Gagné's MySQL Blog
In my previous post about InnoDB Stalls on Empty Free List, I used a test environment that might look a little artificial : a table larger than the InnoDB Buffer Pool but fitting in the Linux Page Cache. This configuration allows serving very quickly what MySQL thinks are IOs because these are hit in the filesystem cache. In this post, I explain why this environment is not| J-F Gagné's MySQL Blog
If, in Percona Server, you are observing tail latencies on queries that should be fast, this might be a side effect of Percona's improved InnoDB Empty Free List Algorithm. When using this algorithm (the default in 5.6 and 5.7 and optional configuration in 8.0), a query needing a free page while none are available waits until the LRU Manager Thread refills the free list. Because this| J-F Gagné's MySQL Blog
Sometimes, the MySQL Optimizer chooses a wrong plan, and a query that should execute in less than 0.1 second ends-up running for 12 minutes ! This is not a new problem: bugs about this can be traced back to 2014, and a blog post on the subject dates of 2015. But even if this is old news, because this problem recently came to my attention, it is a problem worth writing on. This| J-F Gagné's MySQL Blog
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| J-F Gagné's MySQL Blog
In the last weeks / months, I have been working on understanding / improving MySQL startup with many tables. I already wrote a post about m...| jfg-mysql.blogspot.com