Tagged with "binlog"
Fun MySQL fact of the day: redo logs
Over the last few weeks, we've considered how useful the MySQL binary log can be, but you may be thinking, "if the binary log doesn't get written until commit, how does MySQL undo a transaction if it crashes?". And, well, if you remember back through March and April, you'll ... read moreFun MySQL fact of the day: group commit
We now know that each MySQL thread has its own binary log cache to which it writes the binary log events for a single transaction. We also briefly discussed that MySQL will, upon commit of a transaction, write the thread's binary log cache to the actual binary log file. And ... read moreFun MySQL fact of the day: binlog cache overflow
Yesterday, we started to consider how MySQL writes its binary log file, and we started to look at how MySQL uses a per-thread binary log cache, which, by default, is 32KB. Depending on your systems' access patterns, however, 32KB may seem rather small. For example, what if you frequently ... read moreFun MySQL fact of the day: binlog cache
By now, I think we have a shared understanding that the binary log is an important feature in MySQL. And maybe, you may have been wondering, "how does the binary log get recorded"? And that's a good question with a couple fun facts we'll look at next! ... read moreFun MySQL fact of the day: binlog row image
Considering yesterday's downsides to theROW
binary log format, you may have spent the night sad and upset, maybe even unable to sleep. Likely, the narrative was along the lines of, "why, oh why, MySQL, must you make me choose between binary log size and safety?!" Well, rest-assured, tonight, you'll ... read more
Fun MySQL fact of the day: ROW format
Over the last couple weeks, all of the examples we've considered have used theSTATEMENT
binary log format. We've also discussed, no less than two times, that the STATEMENT
format is prone to incorrect results for non-deterministic DML (Data Manipulation Language) statements, and last Friday, we considered the ROW
... read more
Fun MySQL fact of the day: unsafe logging
Over the last couple weeks, we've been discussing the MySQL binary log and building up our mental mode around theSTATEMENT
-based binary log format. When using a STATEMENT
binary log format, MySQL very simply puts the SQL statement that issued a change into the binary log. Then, when we ... read more
Fun MySQL fact of the day: PITR without GTIDs
When we isolated yesterday's bad transaction using GTIDs, life was pretty simple. But in some cases, GTIDs won't be an option for us. So, today, we'll take a slightly closer look at the binary log and figure out an alternative. ... read moreFun MySQL fact of the day: PITR with GTIDs
Yesterday, we looked at MySQL'sMASTER_DELAY
functionality, which we may use to maintain a delayed replica in our important database clusters. A couple weeks ago, we also looked at a very basic point-in-time recovery technique using mysqlbinlog
. Today, we're going to combine the two with a universal ... read more