MySQL 8.4.2
Source Code Documentation
|
The performance schema implementation of the notification service. More...
#include <mysql/components/my_service.h>
#include <mysql/components/service_implementation.h>
#include <mysql/plugin.h>
#include <string.h>
#include <atomic>
#include "my_systime.h"
#include "pfs_thread_provider.h"
#include "sql/log.h"
#include "storage/perfschema/pfs_instr.h"
#include "storage/perfschema/pfs_server.h"
#include "storage/perfschema/pfs_services.h"
#include "template_utils.h"
Classes | |
struct | PFS_notification_node |
PFS_notification_node Element of the notification registry containing callback functions. More... | |
struct | PFS_notification_registry |
PFS_notification_registry A singly linked list of callback registrations. More... | |
Macros | |
#define | EVENT_THREAD_CREATE 0x0001 |
Bitmap identifiers for PSI_notification callbacks. More... | |
#define | EVENT_THREAD_DESTROY 0x0002 |
#define | EVENT_SESSION_CONNECT 0x0004 |
#define | EVENT_SESSION_DISCONNECT 0x0008 |
#define | EVENT_SESSION_CHANGE_USER 0x0010 |
Functions | |
void | pfs_get_thread_system_attrs (PFS_thread *thread, PSI_thread_attrs *thread_attrs) |
int | pfs_register_notification (const PSI_notification *callbacks, bool with_ref_count) |
Register callbacks for the Notification service. More... | |
int | pfs_unregister_notification (int handle) |
Unregister callbacks for the Notification service. More... | |
void | pfs_notify_thread_create (PFS_thread *thread) |
Invoke callbacks registered for create thread events. More... | |
void | pfs_notify_thread_destroy (PFS_thread *thread) |
Invoke callbacks registered for destroy thread events. More... | |
void | pfs_notify_session_connect (PFS_thread *thread) |
Invoke callbacks registered for session connect events. More... | |
void | pfs_notify_session_disconnect (PFS_thread *thread) |
Invoke callbacks registered for session disconnect events. More... | |
void | pfs_notify_session_change_user (PFS_thread *thread) |
Invoke callbacks registered for session change user events. More... | |
int | impl_register_notification (const PSI_notification *callbacks, bool with_ref_count) |
Notification Service implementation. More... | |
int | impl_unregister_notification (int handle) |
Variables | |
static PFS_notification_registry | pfs_notification_registry |
Notification service registry. More... | |
const mysql_service_pfs_notification_v3_t | SERVICE_IMPLEMENTATION (mysql_server, pfs_notification_v3) |
The performance schema implementation of the notification service.
#define EVENT_SESSION_CHANGE_USER 0x0010 |
#define EVENT_SESSION_CONNECT 0x0004 |
#define EVENT_SESSION_DISCONNECT 0x0008 |
#define EVENT_THREAD_CREATE 0x0001 |
Bitmap identifiers for PSI_notification callbacks.
#define EVENT_THREAD_DESTROY 0x0002 |
int impl_register_notification | ( | const PSI_notification * | callbacks, |
bool | with_ref_count | ||
) |
Notification Service implementation.
int impl_unregister_notification | ( | int | handle | ) |
void pfs_get_thread_system_attrs | ( | PFS_thread * | thread, |
PSI_thread_attrs * | thread_attrs | ||
) |
void pfs_notify_session_change_user | ( | PFS_thread * | thread | ) |
Invoke callbacks registered for session change user events.
thread | instrumented thread |
void pfs_notify_session_connect | ( | PFS_thread * | thread | ) |
Invoke callbacks registered for session connect events.
thread | instrumented thread |
void pfs_notify_session_disconnect | ( | PFS_thread * | thread | ) |
Invoke callbacks registered for session disconnect events.
thread | instrumented thread |
void pfs_notify_thread_create | ( | PFS_thread * | thread | ) |
Invoke callbacks registered for create thread events.
This is an internal function, not part of Notification API.
thread | instrumented thread |
void pfs_notify_thread_destroy | ( | PFS_thread * | thread | ) |
Invoke callbacks registered for destroy thread events.
This is an internal function, not part of Notification API.
thread | instrumented thread |
int pfs_register_notification | ( | const PSI_notification * | callbacks, |
bool | with_ref_count | ||
) |
Register callbacks for the Notification service.
callbacks | block of callback function pointers |
with_ref_count | true if callbacks can be unregistered |
int pfs_unregister_notification | ( | int | handle | ) |
Unregister callbacks for the Notification service.
handle | unique handle returned by register_notification() |
|
static |
Notification service registry.
const mysql_service_pfs_notification_v3_t SERVICE_IMPLEMENTATION(mysql_server, pfs_notification_v3) | ( | mysql_server | , |
pfs_notification_v3 | |||
) |