#include <stddef.h>
#include "my_systime.h"
#include "mysql/service_locking.h"
Go to the source code of this file.
◆ acquire_locking_service_locks()
Acquire locking service locks.
- Parameters
-
opaque_thd | Thread handle. If NULL, current_thd will be used. |
lock_namespace | Namespace of the locks to acquire. |
lock_names | Array of names of the locks to acquire. |
lock_num | Number of elements in 'lock_names'. |
lock_type | Lock type to acquire. LOCKING_SERVICE_READ or _WRITE. |
lock_timeout | Number of seconds to wait before giving up. |
- Return values
-
1 | Acquisition failed, error has been reported. |
0 | Acquisition successful, all locks acquired. |
- Note
- both lock_namespace and lock_names are limited to 64 characters max. Names are compared using binary comparison.
◆ release_all_locking_service_locks()
void release_all_locking_service_locks |
( |
THD * |
thd | ) |
|
Release all locking service locks taken by the given connection in all namespaces.
- Parameters
-
◆ release_locking_service_locks()
int release_locking_service_locks |
( |
MYSQL_THD |
opaque_thd, |
|
|
const char * |
lock_namespace |
|
) |
| |
Release all lock service locks taken by the given connection in the given namespace.
- Parameters
-
opaque_thd | Thread handle. If NULL, current_thd will be used. |
lock_namespace | Namespace of the locks to release. |
- Return values
-
1 | Release failed, error has been reported. |
0 | Release successful, all locks acquired. |