<Insert Picture Here>
MySQL 5.5 Replication Enhancements – An Overview
Lenz GrimmerMySQL Community Relations Specialist
Semi-synchronous Replication
• Improves replication resilience and failover reliability
• Designed as a plugin• COMMITs on the master node are
acknowledged only when at least one slave has logged the event in the relay log
• Data is not lost in case of failover
Replication Heartbeat
• Message sent at regular intervals from master node to slave nodes
• Avoids spurious relay log rotation when master node is idle
• Heartbeats are sent only if there are no more unsent events in the binlog file
• If message is not received, slave knows that master node has failed
Replication Slave fsync() Options
• Fine tune relay logs and {master|relay-log}.info fsync operations
• Reduces potential file corruption when slave crashes
• Three new parameters to configure how often IO and SQL threads will issue file sync
Automatic Relay Log Recovery
• Ensures master/slave consistency on restart• Slave automatically discard its own
unprocessed relay logs• Recovers pending transactions from the
originating master
Per-master Event Filtering
• MySQL slave can discard events coming from a specific master
• 'CHANGE MASTER' now supports 'IGNORE_SERVER_IDS = ...' to configure which events should be discarded
• Useful in circular replication topologies
Replication Slave Side Type Conversions
• Row-based replication between columns with different types was limited
• Type promotion and demotion is now supported
• Examples:– Replicate seamlessly from TINYINT column on master
to INT column on the slave– Or CHAR(10) column to a VARCHAR(20) column– Or even from TEXT column to VARCHAR(20) column
Individual Log Flushing
• Users can now selectively flush server logs with 'FLUSH LOGS'
• Before, every time users wanted to flush such logs, other server logs would flush as well
• Now users can specify which individual log to flush by providing the log type as an argument to the 'FLUSH LOGS' command
SHOW RELAYLOG EVENTS
• You can now show relay log contents, as you would do for the binlogs
• Useful for comparing events on the master binlog against the slave relay log
• Easier to inspect the binary and relay logs on servers that act both as master and slave in chained replication topologies
• May also be used to diagnose relay log corruption
Give it a spin!
• Download MySQL 5.5 from the usual place:http://dev.mysql.com/downloads/mysql/
• Send us feedback and bug reports:http://bugs.mysql.com/
• Questions? Use the Forums or Mailing Lists:http://forums.mysql.com|http://lists.mysql.com
• Blog about your experiences:http://planet.mysql.com
Discussion / Q & A