Skip to content

Commit fcf8f70

Browse files
authored
add description for locking function when timeout = -1 (pingcap#8910)
1 parent d61a930 commit fcf8f70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions-and-operators/locking-functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TiDB supports most of the user-level [locking functions](https://dev.mysql.com/d
1717

1818
## MySQL compatibility
1919

20-
* The minimum timeout permitted by TiDB is 1 second, and the maximum timeout is 1 hour (3600 seconds). This differs from MySQL, where both 0 second and unlimited timeouts are permitted. TiDB will automatically convert out-of-range values to the nearest permitted value.
20+
* The minimum timeout permitted by TiDB is 1 second, and the maximum timeout is 1 hour (3600 seconds). This differs from MySQL, where both 0 second and unlimited timeouts (`timeout=-1`) are permitted. TiDB will automatically convert out-of-range values to the nearest permitted value and convert `timeout=-1` to 3600 seconds.
2121
* TiDB does not automatically detect deadlocks caused by user-level locks. Deadlocked sessions will timeout after a maximum of 1 hour, but can also be manually resolved by using `KILL` on one of the affected sessions. You can also prevent deadlocks by always acquiring user-level locks in the same order.
2222
* Locks take effect on all TiDB servers in the cluster. This differs from MySQL Cluster and Group Replication where locks are local to a single server.
2323

0 commit comments

Comments
 (0)