Bug #114973 deadlock happens in more than two transactions
Submitted: 13 May 2024 6:55 Modified: 13 May 2024 16:19
Reporter: Woson Wong Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:ALL OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[13 May 2024 6:55] Woson Wong
Description:
In the last version(2024-05-13) of Reference Manual: https://dev.mysql.com/doc/refman/8.0/en/innodb-deadlocks.html.

About the deadlock concept:
A deadlock is a situation where different transactions are unable to proceed because each holds a lock that the other needs. Because both transactions are waiting for a resource to become available, neither ever release the locks it holds.

(In which, both transactions means two transactions, the number of transactions is not above two.)

But we met the issue that a deadlock can happen in more than two transactions. 

How to repeat:
In the last version(2024-05-13) of Reference Manual: https://dev.mysql.com/doc/refman/8.0/en/innodb-deadlocks.html.

About the deadlock concept:
A deadlock is a situation where different transactions are unable to proceed because each holds a lock that the other needs. Because both transactions are waiting for a resource to become available, neither ever release the locks it holds.

Suggested fix:
In the guide document of Oracle, 
https://docs.oracle.com/javadb/10.6.2.1/devguide/cdevconcepts28436.html

There is a more accuracy description:
In a database, a deadlock is a situation in which two or more transactions are waiting for one another to give up locks.

(It means that deadlock can happen in more than two transactions.)
[13 May 2024 12:16] MySQL Verification Team
Hi Mr. Wong,

Thank you for your bug report.

However, we have just visited the page:

https://dev.mysql.com/doc/refman/8.0/en/innodb-deadlocks.html

and we do not see any such text.

By all means, it is wrong that only two transactions can be involved in a deadlock. 

However, that text is already corrected.

Not a bug.
[13 May 2024 13:24] Woson Wong
The sentence at the MySQL 8.0 Reference Manual is:
A deadlock is a situation where different transactions are unable to proceed because each holds a lock that the other needs. Because both transactions are waiting for a resource to become available, neither ever release the locks it holds.

I mean the "both transactions" can make other people confuse, because "both" is (referring to) two people or things together. But deadlock can happen in three transactions situation, so use the word "both" is not accurate.
[13 May 2024 13:37] MySQL Verification Team
Hi Mr. Wong,

Yes "both" is the wrong word.

"all" would be a correct one ......

We will fix it immediately ......
[13 May 2024 16:19] Jon Stephens
Fixed in all versions of the Manaul, in mysqldoc rev 78592.

Thanks!

Closed.
[14 May 2024 10:14] MySQL Verification Team
Thank you, Jon.