![]() |
MySQL 9.0.0
Source Code Documentation
|
Macros | |
#define | mysql_socket_register(P1, P2, P3) inline_mysql_socket_register(P1, P2, P3) |
Socket registration. More... | |
#define | MYSQL_SOCKET_WAIT_VARIABLES(LOCKER, STATE) |
Instrumentation helper for socket waits. More... | |
#define | MYSQL_START_SOCKET_WAIT(LOCKER, STATE, SOCKET, OP, COUNT) |
Instrumentation helper for socket waits. More... | |
#define | MYSQL_END_SOCKET_WAIT(LOCKER, COUNT) inline_mysql_end_socket_wait(LOCKER, COUNT) |
Instrumentation helper for socket waits. More... | |
#define | MYSQL_SOCKET_SET_STATE(SOCKET, STATE) inline_mysql_socket_set_state(SOCKET, STATE) |
Set the state (IDLE, ACTIVE) of an instrumented socket. More... | |
#define | mysql_socket_socket(K, D, T, P) inline_mysql_socket_socket(K, D, T, P) |
Create a socket. More... | |
#define | mysql_socket_bind(FD, AP, L) inline_mysql_socket_bind(__FILE__, __LINE__, FD, AP, L) |
Bind a socket to a local port number and IP address mysql_socket_bind is a replacement for bind . More... | |
#define | mysql_socket_getsockname(FD, AP, LP) inline_mysql_socket_getsockname(__FILE__, __LINE__, FD, AP, LP) |
Return port number and IP address of the local host mysql_socket_getsockname is a replacement for getsockname . More... | |
#define | mysql_socket_connect(FD, AP, L) inline_mysql_socket_connect(__FILE__, __LINE__, FD, AP, L) |
Establish a connection to a remote host. More... | |
#define | mysql_socket_getpeername(FD, AP, LP) inline_mysql_socket_getpeername(__FILE__, __LINE__, FD, AP, LP) |
Get port number and IP address of remote host that a socket is connected to. More... | |
#define | mysql_socket_send(FD, B, N, FL) inline_mysql_socket_send(__FILE__, __LINE__, FD, B, N, FL) |
Send data from the buffer, B, to a connected socket. More... | |
#define | mysql_socket_recv(FD, B, N, FL) inline_mysql_socket_recv(__FILE__, __LINE__, FD, B, N, FL) |
Receive data from a connected socket. More... | |
#define | mysql_socket_sendto(FD, B, N, FL, AP, L) inline_mysql_socket_sendto(__FILE__, __LINE__, FD, B, N, FL, AP, L) |
Send data to a socket at the specified address. More... | |
#define | mysql_socket_recvfrom(FD, B, N, FL, AP, LP) inline_mysql_socket_recvfrom(__FILE__, __LINE__, FD, B, N, FL, AP, LP) |
Receive data from a socket and return source address information mysql_socket_recvfrom is a replacement for recvfrom . More... | |
#define | mysql_socket_getsockopt(FD, LV, ON, OP, OL) inline_mysql_socket_getsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL) |
Get a socket option for the specified socket. More... | |
#define | mysql_socket_setsockopt(FD, LV, ON, OP, OL) inline_mysql_socket_setsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL) |
Set a socket option for the specified socket. More... | |
#define | mysql_sock_set_nonblocking(FD) inline_mysql_sock_set_nonblocking(__FILE__, __LINE__, FD) |
Set socket to non-blocking. More... | |
#define | mysql_socket_listen(FD, N) inline_mysql_socket_listen(__FILE__, __LINE__, FD, N) |
Set socket state to listen for an incoming connection. More... | |
#define | mysql_socket_accept(K, FD, AP, LP) inline_mysql_socket_accept(__FILE__, __LINE__, K, FD, AP, LP) |
Accept a connection from any remote host; TCP only. More... | |
#define | mysql_socket_close(FD) inline_mysql_socket_close(__FILE__, __LINE__, FD) |
Close a socket and sever any connections. More... | |
#define | mysql_socket_shutdown(FD, H) inline_mysql_socket_shutdown(__FILE__, __LINE__, FD, H) |
Disable receives and/or sends on a socket. More... | |
Functions | |
static void | mysql_socket_set_address (MYSQL_SOCKET socket, const struct sockaddr *addr, socklen_t addr_len) |
Set socket descriptor and address. More... | |
static void | mysql_socket_set_thread_owner (MYSQL_SOCKET socket) |
Assign the current thread instrumentation to the socket. More... | |
static my_socket | mysql_socket_getfd (MYSQL_SOCKET mysql_socket) |
MYSQL_SOCKET helper. More... | |
static void | mysql_socket_setfd (MYSQL_SOCKET *mysql_socket, my_socket fd) |
MYSQL_SOCKET helper. More... | |
static struct PSI_socket_locker * | inline_mysql_start_socket_wait (PSI_socket_locker_state *state, MYSQL_SOCKET mysql_socket, enum PSI_socket_operation op, size_t byte_count, const char *src_file, int src_line) |
Instrumentation calls for MYSQL_START_SOCKET_WAIT. More... | |
static void | inline_mysql_end_socket_wait (struct PSI_socket_locker *locker, size_t byte_count) |
Instrumentation calls for MYSQL_END_SOCKET_WAIT. More... | |
static void | inline_mysql_socket_set_state (MYSQL_SOCKET socket, enum PSI_socket_state state) |
Set the state (IDLE, ACTIVE) of an instrumented socket. More... | |
static void | inline_mysql_socket_register (const char *category, PSI_socket_info *info, int count) |
static MYSQL_SOCKET | inline_mysql_socket_socket (PSI_socket_key key, int domain, int type, int protocol) |
mysql_socket_socket More... | |
static int | inline_mysql_socket_bind (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, socklen_t len) |
mysql_socket_bind More... | |
static int | inline_mysql_socket_getsockname (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, struct sockaddr *addr, socklen_t *len) |
mysql_socket_getsockname More... | |
static int | inline_mysql_socket_connect (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, socklen_t len) |
mysql_socket_connect More... | |
static int | inline_mysql_socket_getpeername (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, struct sockaddr *addr, socklen_t *len) |
mysql_socket_getpeername More... | |
static ssize_t | inline_mysql_socket_send (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags) |
mysql_socket_send More... | |
static ssize_t | inline_mysql_socket_recv (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags) |
mysql_socket_recv More... | |
static ssize_t | inline_mysql_socket_sendto (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags, const struct sockaddr *addr, socklen_t addr_len) |
mysql_socket_sendto More... | |
static ssize_t | inline_mysql_socket_recvfrom (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags, struct sockaddr *addr, socklen_t *addr_len) |
mysql_socket_recvfrom More... | |
static int | inline_mysql_socket_getsockopt (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, int level, int optname, SOCKBUF_T *optval, socklen_t *optlen) |
mysql_socket_getsockopt More... | |
static int | inline_mysql_socket_setsockopt (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, int level, int optname, const SOCKBUF_T *optval, socklen_t optlen) |
mysql_socket_setsockopt More... | |
static int | set_socket_nonblock (my_socket fd) |
set_socket_nonblock More... | |
static int | inline_mysql_sock_set_nonblocking (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket) |
mysql_socket_set_nonblocking More... | |
static int | inline_mysql_socket_listen (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, int backlog) |
mysql_socket_listen More... | |
static MYSQL_SOCKET | inline_mysql_socket_accept (const char *src_file, uint src_line, PSI_socket_key key, MYSQL_SOCKET socket_listen, struct sockaddr *addr, socklen_t *addr_len) |
mysql_socket_accept More... | |
static int | inline_mysql_socket_close (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket) |
mysql_socket_close More... | |
static int | inline_mysql_socket_shutdown (const char *src_file, uint src_line, MYSQL_SOCKET mysql_socket, int how) |
mysql_socket_shutdown More... | |
#define MYSQL_END_SOCKET_WAIT | ( | LOCKER, | |
COUNT | |||
) | inline_mysql_end_socket_wait(LOCKER, COUNT) |
Instrumentation helper for socket waits.
This instrumentation marks the end of a wait event.
LOCKER | locker |
COUNT | actual bytes written/read, or -1 |
#define mysql_sock_set_nonblocking | ( | FD | ) | inline_mysql_sock_set_nonblocking(__FILE__, __LINE__, FD) |
Set socket to non-blocking.
FD | instrumented socket descriptor |
#define mysql_socket_accept | ( | K, | |
FD, | |||
AP, | |||
LP | |||
) | inline_mysql_socket_accept(__FILE__, __LINE__, K, FD, AP, LP) |
Accept a connection from any remote host; TCP only.
mysql_socket_accept
is a replacement for accept
.
K | PSI_socket_key for this instrumented socket |
FD | Instrumented socket descriptor, bound and placed in a listen state |
AP | Pointer to sockaddr structure with returned IP address and port of connected host |
LP | Pointer to length of valid information in AP |
#define mysql_socket_bind | ( | FD, | |
AP, | |||
L | |||
) | inline_mysql_socket_bind(__FILE__, __LINE__, FD, AP, L) |
Bind a socket to a local port number and IP address mysql_socket_bind
is a replacement for bind
.
FD | Instrumented socket descriptor returned by socket() |
AP | Pointer to local port number and IP address in sockaddr structure |
L | Length of sockaddr structure |
#define mysql_socket_close | ( | FD | ) | inline_mysql_socket_close(__FILE__, __LINE__, FD) |
Close a socket and sever any connections.
mysql_socket_close
is a replacement for close
.
FD | Instrumented socket descriptor returned by socket() or accept() |
#define mysql_socket_connect | ( | FD, | |
AP, | |||
L | |||
) | inline_mysql_socket_connect(__FILE__, __LINE__, FD, AP, L) |
Establish a connection to a remote host.
mysql_socket_connect
is a replacement for connect
.
FD | Instrumented socket descriptor returned by socket() |
AP | Pointer to target address in sockaddr structure |
L | Length of sockaddr structure |
#define mysql_socket_getpeername | ( | FD, | |
AP, | |||
LP | |||
) | inline_mysql_socket_getpeername(__FILE__, __LINE__, FD, AP, LP) |
Get port number and IP address of remote host that a socket is connected to.
mysql_socket_getpeername
is a replacement for getpeername
.
FD | Instrumented socket descriptor returned by socket() or accept() |
AP | Pointer to returned address of remote host in sockaddr structure |
LP | Pointer to length of sockaddr structure |
#define mysql_socket_getsockname | ( | FD, | |
AP, | |||
LP | |||
) | inline_mysql_socket_getsockname(__FILE__, __LINE__, FD, AP, LP) |
Return port number and IP address of the local host mysql_socket_getsockname
is a replacement for getsockname
.
FD | Instrumented socket descriptor returned by socket() |
AP | Pointer to returned address of local host in sockaddr structure |
LP | Pointer to length of sockaddr structure |
#define mysql_socket_getsockopt | ( | FD, | |
LV, | |||
ON, | |||
OP, | |||
OL | |||
) | inline_mysql_socket_getsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL) |
Get a socket option for the specified socket.
mysql_socket_getsockopt
is a replacement for getsockopt
.
FD | Instrumented socket descriptor returned by socket() |
LV | Protocol level |
ON | Option to query |
OP | Buffer which will contain the value for the requested option |
OL | Pointer to length of OP |
#define mysql_socket_listen | ( | FD, | |
N | |||
) | inline_mysql_socket_listen(__FILE__, __LINE__, FD, N) |
Set socket state to listen for an incoming connection.
mysql_socket_listen
is a replacement for listen
.
FD | Instrumented socket descriptor, bound and connected |
N | Maximum number of pending connections allowed. |
#define mysql_socket_recv | ( | FD, | |
B, | |||
N, | |||
FL | |||
) | inline_mysql_socket_recv(__FILE__, __LINE__, FD, B, N, FL) |
Receive data from a connected socket.
mysql_socket_recv
is a replacement for recv
.
FD | Instrumented socket descriptor returned by socket() or accept() |
B | Buffer to receive to |
N | Maximum bytes to receive |
FL | Control flags |
#define mysql_socket_recvfrom | ( | FD, | |
B, | |||
N, | |||
FL, | |||
AP, | |||
LP | |||
) | inline_mysql_socket_recvfrom(__FILE__, __LINE__, FD, B, N, FL, AP, LP) |
Receive data from a socket and return source address information mysql_socket_recvfrom
is a replacement for recvfrom
.
FD | Instrumented socket descriptor returned by socket() |
B | Buffer to receive to |
N | Maximum bytes to receive |
FL | Control flags |
AP | Pointer to source address in sockaddr_storage structure |
LP | Size of sockaddr_storage structure |
#define mysql_socket_register | ( | P1, | |
P2, | |||
P3 | |||
) | inline_mysql_socket_register(P1, P2, P3) |
Socket registration.
#define mysql_socket_send | ( | FD, | |
B, | |||
N, | |||
FL | |||
) | inline_mysql_socket_send(__FILE__, __LINE__, FD, B, N, FL) |
Send data from the buffer, B, to a connected socket.
mysql_socket_send
is a replacement for send
.
FD | Instrumented socket descriptor returned by socket() or accept() |
B | Buffer to send |
N | Number of bytes to send |
FL | Control flags |
#define mysql_socket_sendto | ( | FD, | |
B, | |||
N, | |||
FL, | |||
AP, | |||
L | |||
) | inline_mysql_socket_sendto(__FILE__, __LINE__, FD, B, N, FL, AP, L) |
Send data to a socket at the specified address.
mysql_socket_sendto
is a replacement for sendto
.
FD | Instrumented socket descriptor returned by socket() |
B | Buffer to send |
N | Number of bytes to send |
FL | Control flags |
AP | Pointer to destination sockaddr structure |
L | Size of sockaddr structure |
#define MYSQL_SOCKET_SET_STATE | ( | SOCKET, | |
STATE | |||
) | inline_mysql_socket_set_state(SOCKET, STATE) |
Set the state (IDLE, ACTIVE) of an instrumented socket.
SOCKET | the instrumented socket |
STATE | the new state |
#define mysql_socket_setsockopt | ( | FD, | |
LV, | |||
ON, | |||
OP, | |||
OL | |||
) | inline_mysql_socket_setsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL) |
Set a socket option for the specified socket.
mysql_socket_setsockopt
is a replacement for setsockopt
.
FD | Instrumented socket descriptor returned by socket() |
LV | Protocol level |
ON | Option to modify |
OP | Buffer containing the value for the specified option |
OL | Pointer to length of OP |
#define mysql_socket_shutdown | ( | FD, | |
H | |||
) | inline_mysql_socket_shutdown(__FILE__, __LINE__, FD, H) |
Disable receives and/or sends on a socket.
mysql_socket_shutdown
is a replacement for shutdown
.
FD | Instrumented socket descriptor returned by socket() or accept() |
H | Specifies which operations to shutdown |
#define mysql_socket_socket | ( | K, | |
D, | |||
T, | |||
P | |||
) | inline_mysql_socket_socket(K, D, T, P) |
Create a socket.
mysql_socket_socket
is a replacement for socket
.
K | PSI_socket_key for this instrumented socket |
D | Socket domain |
T | Protocol type |
P | Transport protocol |
#define MYSQL_SOCKET_WAIT_VARIABLES | ( | LOCKER, | |
STATE | |||
) |
Instrumentation helper for socket waits.
This instrumentation declares local variables. Do not use a ';' after this macro
LOCKER | locker |
STATE | locker state |
#define MYSQL_START_SOCKET_WAIT | ( | LOCKER, | |
STATE, | |||
SOCKET, | |||
OP, | |||
COUNT | |||
) |
Instrumentation helper for socket waits.
This instrumentation marks the start of a wait event.
LOCKER | locker |
STATE | locker state |
SOCKET | instrumented socket |
OP | The socket operation to be performed |
COUNT | bytes to be written/read |
|
inlinestatic |
Instrumentation calls for MYSQL_END_SOCKET_WAIT.
|
inlinestatic |
mysql_socket_set_nonblocking
|
inlinestatic |
mysql_socket_accept
|
inlinestatic |
mysql_socket_bind
|
inlinestatic |
mysql_socket_close
|
inlinestatic |
mysql_socket_connect
|
inlinestatic |
mysql_socket_getpeername
|
inlinestatic |
mysql_socket_getsockname
|
inlinestatic |
mysql_socket_getsockopt
|
inlinestatic |
mysql_socket_listen
|
inlinestatic |
mysql_socket_recv
|
inlinestatic |
mysql_socket_recvfrom
|
inlinestatic |
|
inlinestatic |
mysql_socket_send
|
inlinestatic |
mysql_socket_sendto
|
inlinestatic |
Set the state (IDLE, ACTIVE) of an instrumented socket.
socket | the instrumented socket |
state | the new state |
|
inlinestatic |
mysql_socket_setsockopt
|
inlinestatic |
mysql_socket_shutdown
|
inlinestatic |
mysql_socket_socket
|
inlinestatic |
Instrumentation calls for MYSQL_START_SOCKET_WAIT.
|
inlinestatic |
MYSQL_SOCKET helper.
Get socket descriptor.
mysql_socket | Instrumented socket |
|
inlinestatic |
Set socket descriptor and address.
socket | instrumented socket |
addr | unformatted socket address |
addr_len | length of socket address |
|
inlinestatic |
Assign the current thread instrumentation to the socket.
socket | instrumented socket |
|
inlinestatic |
MYSQL_SOCKET helper.
Set socket descriptor.
mysql_socket | Instrumented socket |
fd | Socket descriptor |
|
inlinestatic |
set_socket_nonblock