문제

How do i enable logs for locks in MySQL? For example, if i run select * from table on my InnoDB table, MySQL must internally lock this table.

I want to learn how and when MySQL locks my table and in what modes. A log would help.

도움이 되었습니까?

해결책

It is important to clarify that SELECT * FROM table will not set locks with your InnoDB table. Please see my answer here:

Confusion regarding INNODB locking

Regarding a log for locks:

It is likely the case that this would generate far too much information, and reduce throughput for high traffic database servers.

You may be interested in checking out performance_schema which is a set of internal meta data tables inside of MySQL that can be queried to show lock wait information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top