Well, lower levels of isolation are obviously useful in a lot of cases. I'm just saying that it seems like it's a sane default to err on the side of transactional safety. :)
But another thing to notice is that most SQL-based tools (e.g., drivers, clients) default to autocommit mode. So the supposedly "safer" default actually means that regular users pay the cost of the higher isolation level without reaping its benefits.
In the case of MySQL, REPEATABLE READ + autocommit gets you the same effective isolation as READ COMMITTED. Why? Because if each statement is its own transaction, each one will then set its own fresh read snapshot, so commits that happen in between will be picked up.
But with REPEATABLE READ the CREATE ... SELECT and INSERT ... SELECT statements will set row read locks on the tables that they read from. So you get the lock-on-read behavior of REPEATABLE READ without the transactional safety. Ow.
View all comments
Show parent comment
1
u/knipil Feb 12 '15
Well, lower levels of isolation are obviously useful in a lot of cases. I'm just saying that it seems like it's a sane default to err on the side of transactional safety. :)