MySQL 8.0.39
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/components/services/pfs_notification.h>
#include <mysql/plugin.h>
#include <string.h>
#include <atomic>
#include "my_systime.h"
#include "pfs_thread_provider.h"
#include "storage/perfschema/pfs_server.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 | |
int | pfs_get_thread_system_attrs_by_id_vc (PSI_thread *thread, ulonglong thread_id, PSI_thread_attrs *thread_attrs) |
Implementation of the thread instrumentation interface. More... | |
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 (PSI_thread *thread) |
Invoke callbacks registered for create thread events. More... | |
void | pfs_notify_thread_destroy (PSI_thread *thread) |
Invoke callbacks registered for destroy thread events. More... | |
void | pfs_notify_session_connect (PSI_thread *thread) |
Invoke callbacks registered for session connect events. More... | |
void | pfs_notify_session_disconnect (PSI_thread *thread) |
Invoke callbacks registered for session disconnect events. More... | |
void | pfs_notify_session_change_user (PSI_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) |
int | register_pfs_notification_service () |
Register the Notification service with the MySQL server registry. More... | |
int | unregister_pfs_notification_service () |
Unregister the Notification service. More... | |
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 | ) |
int pfs_get_thread_system_attrs_by_id_vc | ( | PSI_thread * | thread, |
ulonglong | thread_id, | ||
PSI_thread_attrs * | thread_attrs | ||
) |
Implementation of the thread instrumentation interface.
void pfs_notify_session_change_user | ( | PSI_thread * | thread | ) |
Invoke callbacks registered for session change user events.
thread | instrumented thread |
void pfs_notify_session_connect | ( | PSI_thread * | thread | ) |
Invoke callbacks registered for session connect events.
thread | instrumented thread |
void pfs_notify_session_disconnect | ( | PSI_thread * | thread | ) |
Invoke callbacks registered for session disconnect events.
thread | instrumented thread |
void pfs_notify_thread_create | ( | PSI_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 | ( | PSI_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() |
int register_pfs_notification_service | ( | ) |
Register the Notification service with the MySQL server registry.
Register/unregister notification service.
int unregister_pfs_notification_service | ( | ) |
Unregister the Notification service.
|
static |
Notification service registry.
const mysql_service_pfs_notification_v3_t SERVICE_IMPLEMENTATION(mysql_server, pfs_notification_v3) | ( | mysql_server | , |
pfs_notification_v3 | |||
) |