Skip to content

Commit 81054a6

Browse files
marios88mvorisek
andauthored
Update readme regarding mysql (#54)
Co-authored-by: Michael Voříšek <[email protected]>
1 parent 63c1b26 commit 81054a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ $mutex->synchronized(function () use ($pdo, $accountId, $amount) {
342342
#### MySQLMutex
343343

344344
The **MySQLMutex** uses MySQL's
345-
[`GET_LOCK`](https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_get-lock)
345+
[`GET_LOCK`](https://dev.mysql.com/doc/refman/9.0/en/locking-functions.html#function_get-lock)
346346
function.
347347

348348
It supports time outs. If the connection to the database server is lost or
@@ -352,6 +352,9 @@ Note that before MySQL 5.7.5 you cannot use nested locks, any new lock will
352352
silently release already held locks. You should probably refrain from using this
353353
mutex on MySQL versions < 5.7.5.
354354

355+
Also note that `GET_LOCK` function is server wide and the MySQL manual suggests
356+
you to namespace your locks like `dbname.lockname`.
357+
355358
```php
356359
$pdo = new PDO("mysql:host=localhost;dbname=test", "username");
357360

0 commit comments

Comments
 (0)