search

Home  >  Q&A  >  body text

java - MySQL中,使用聚合函数+for update会锁表吗?

比如 select count(*) frmo table_A for update

伊谢尔伦伊谢尔伦2813 days ago681

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:56:08

    This can help you
    http://blog.csdn.net/liqfyiyi...

    reply
    0
  • PHPz

    PHPz2017-04-18 10:56:08

    innodb storage engine supports row locking.
    Consider other storage engines in detail.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:56:08

    mysql, rr isolation mode, innodb storage engine, will lock each row

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:56:08

    My personal feeling is table lock, innodb row lock is conditional
    1: There must be where
    2: The fields involved in where must have indexes
    3: Large range lock. For example, id>=100 will lock all IDs greater than or equal to 100

    reply
    0
  • Cancelreply