Functional State Machines in Rust: Typestate and Newtype Patterns
Summary
This article analyzes a MySQL upgrade that introduced replication inconsistencies due to an AUTO_INCREMENT column and the binlog_format being MIXED. It explains how STATEMENT, ROW, and MIXED formats can cause divergence between source and replica, and highlights practical considerations for DBAs to avoid such disasters.