When the Deadline Made the Solution Better

We had to ship a feature in two weeks that relied on MySQL auto-increment behavior. Problem: our production database was MySQL 5, which handles auto-increment differently than MySQL 8 after a restart. The MySQL 8 migration was scheduled for two months out. We needed to ship now. The “temporary fix” became permanent architecture improvement. The Situation We were building a resource allocation feature that tracked which resources were assigned to which entities. ...

November 15, 2025 · 3 min · Leen

Debugging ProxySQL Query Routing: Transaction Gotchas

Originally published April 2024. Substantially updated October 2025 with expanded analysis and debugging insights. I spent 3 days debugging why ProxySQL wasn’t redirecting queries to read replicas. I checked the configuration. I verified queries redirected when using the CLI. I confirmed auto-commit was enabled. I read the docs cover to cover. The problem? My test framework. The test setup created nested transactions with writes, which pinned everything—including my auto-commit query—to the primary DB. ProxySQL was working fine. My testing setup was broken. ...

April 30, 2024 · 5 min · Leen