I read some articles saying that it is necessary to set a reasonable deadlock timeout for deadlock problems. However, some say that InnoDB will automatically detect transaction deadlocks and roll back immediately with an error.
I tried it and found that "InnoDB will automatically detect transaction deadlocks and immediately roll back with an error." It is more consistent with the experimental results.
so after the mysql deadlock, do you wait for a timeout, or simply report a wrong rollback, or behave differently in different situations?
if "InnoDB will automatically detect transaction deadlocks and roll back immediately with an error." Is the correct situation, what is the concept of "deadlock wait timeout" mentioned in many articles?