なぜ MySQL だけデフォルトが Repeatable Read なのか
DB | トランザクション分離レベル |
---|---|
MySQL(InnoDB) | Repeatable Read |
PostgreSQL | Read Committed |
SQL Server | Read Committed |
Oracle | Read Committed |
DB2 | Read Committed |
なぜ MySQL だけデフォルトが Repeatable Read なのか
MySQL 5.0までのバイナリログはこのようなトランザクションに対してログの整合性を担保できないことがあるため、InnoDB側であえてロックの範囲を広げているのです。
MySQL InnoDBのネクストキーロック おさらい - SH2の日記
The reason why InnoDB use REPEATABLE READ as its default is historical. This is a related to the way MySQL replication was developed . MySQL replication until 5.1 functioned with a statement based replication mechanism. This means that statements that occurs on the master server are replayed on the slave server. The statement base replication mode does not permit to use the READ COMMITTED isolation level. In that case replication will not guaranty consistency between the slave and the master.
InnoDB : Why not use the same isolation level as ORACLE ? « Serge Frezefond 's blog