search

Home  >  Q&A  >  body text

mysql - InnoDB事务级别Serializable level的时候find一个不存的数据会加什么锁

InnoDB事务级别Serializable level的时候find一个不存的数据会加什么锁。

PHP中文网PHP中文网2784 days ago646

reply all(2)I'll reply

  • 阿神

    阿神2017-04-17 15:20:43

    The manual says it very clearly This level is like REPEATABLE READ, but InnoDB implicitly converts all plain SELECT statements to SELECT ... LOCK IN SHARE MODE.
    This means that SELECT will be implicitly converted into SELECT...LOCK IN SHARE MODE, which is a shared lock.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:20:43

    Serializable level
    This level is very simple to understand. Read plus shared lock, write plus exclusive lock, and read and write mutually exclusive. The pessimistic locking theory used is simple to implement and the data is very safe, but the concurrency capability is very poor.

    reply
    0
  • Cancelreply