MySQL 9.1.0
Source Code Documentation
|
Implements mysql_locking_service_st. More...
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | mysql_locking_service_st |
This service provides support for taking read/write locks. More... | |
Macros | |
#define | MYSQL_THD THD * |
Typedefs | |
typedef int(* | mysql_acquire_locks_t) (MYSQL_THD opaque_thd, const char *lock_namespace, const char **lock_names, size_t lock_num, enum enum_locking_service_lock_type lock_type, uint64_t lock_timeout) |
Acquire locking service locks. More... | |
typedef int(* | mysql_release_locks_t) (MYSQL_THD opaque_thd, const char *lock_namespace) |
Release all lock service locks taken by the given connection in the given namespace. More... | |
Enumerations | |
enum | enum_locking_service_lock_type { LOCKING_SERVICE_READ , LOCKING_SERVICE_WRITE } |
Types of locking service locks. More... | |
Functions | |
int | mysql_acquire_locking_service_locks (MYSQL_THD opaque_thd, const char *lock_namespace, const char **lock_names, size_t lock_num, enum enum_locking_service_lock_type lock_type, uint64_t lock_timeout) |
int | mysql_release_locking_service_locks (MYSQL_THD opaque_thd, const char *lock_namespace) |
Variables | |
struct mysql_locking_service_st * | mysql_locking_service |
Implements mysql_locking_service_st.
#define MYSQL_THD THD * |
typedef int(* mysql_acquire_locks_t) (MYSQL_THD opaque_thd, const char *lock_namespace, const char **lock_names, size_t lock_num, enum enum_locking_service_lock_type lock_type, uint64_t lock_timeout) |
Acquire locking service locks.
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. |
1 | Acquisition failed, error has been reported. |
0 | Acquisition successful, all locks acquired. |
typedef int(* mysql_release_locks_t) (MYSQL_THD opaque_thd, const char *lock_namespace) |
Release all lock service locks taken by the given connection in the given namespace.
opaque_thd | Thread handle. If NULL, current_thd will be used. |
lock_namespace | Namespace of the locks to release. |
1 | Release failed, error has been reported. |
0 | Release successful, all locks acquired. |
int mysql_acquire_locking_service_locks | ( | MYSQL_THD | opaque_thd, |
const char * | lock_namespace, | ||
const char ** | lock_names, | ||
size_t | lock_num, | ||
enum enum_locking_service_lock_type | lock_type, | ||
uint64_t | lock_timeout | ||
) |
int mysql_release_locking_service_locks | ( | MYSQL_THD | opaque_thd, |
const char * | lock_namespace | ||
) |