MySQL锁 间隙锁解决RR隔离模式下的幻读问题。 共享锁和排它锁共享锁:select * from table where id = 1 lock in share mode; 独占锁:select * from table where id = 1 for update;