Guilhem Bichot wrote:
> Xuekun Hu a écrit, Le 08.07.2009 02:39:
>> 2. If so, REPEATABLE-READ can protect against the all four secenaria.
>> Why need SERIALIZABLE again, or what is the purpose of SERIALIZABLE to
>> convert all plain SELECT statements to SELECT ... LOCK IN SHARE MODE?
> REPEATABLE READ never uses next-key locking for SELECT.
> So, to protect your SELECTs from phantoms, you need to switch to
This is incorrect. Please see manual:
"By default, InnoDB operates in REPEATABLE READ transaction isolation
level and with the innodb_locks_unsafe_for_binlog system variable
disabled. In this case, InnoDB uses next-key locks for searches and
index scans, which prevents phantom rows"