2022-10-03 select count() 中の insert MySQL count(field) でも count(*) でも、 for update でロックすると、insert はブロックされる。 逆の insert のトランザクション中も select count() はブロックされる。関連 https://ashura156.hatenablog.com/entry/2020/05/13/130916