MySQL 9.0.0
Source Code Documentation
pfs_setup_actor.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef PFS_SETUP_ACTOR_H
25#define PFS_SETUP_ACTOR_H
26
27/**
28 @file storage/perfschema/pfs_setup_actor.h
29 Performance schema setup actors (declarations).
30*/
31
32#include <sys/types.h>
33
34#include "lf.h"
35#include "my_hostname.h" /* HOSTNAME_LENGTH */
36#include "mysql_com.h"
37#include "sql_string.h"
41
42struct PFS_global_param;
43struct PFS_thread;
44class PFS_opaque_container_page;
45
46/**
47 @addtogroup performance_schema_buffers
48 @{
49*/
50
51/** Hash key for @sa PFS_setup_actor. */
56};
57
58/** A setup_actor record. */
60 /** Internal lock. */
62 /** Hash key. */
64 /** ENABLED flag. */
66 /** HISTORY flag. */
68 /** Container page. */
69 PFS_opaque_container_page *m_page;
70};
71
72int init_setup_actor(const PFS_global_param *param);
76
78 const PFS_role_name *role, bool enabled, bool history);
80 const PFS_role_name *role);
83
85 const PFS_host_name *host, bool *enabled,
86 bool *history);
87
88/** Update derived flags for all setup_actors. */
90
91/* For show status. */
92
94
95/** @} */
96#endif
int init_setup_actor_hash(const PFS_global_param *param)
Initialize the setup actor hash.
Definition: pfs_setup_actor.cc:131
long setup_actor_count()
Definition: pfs_setup_actor.cc:276
int init_setup_actor(const PFS_global_param *param)
Initialize the setup actor buffers.
Definition: pfs_setup_actor.cc:59
int update_setup_actors_derived_flags()
Update derived flags for all setup_actors.
Definition: pfs_setup_actor.cc:340
LF_HASH setup_actor_hash
Hash table for setup_actor records.
Definition: pfs_setup_actor.cc:50
int insert_setup_actor(const PFS_user_name *user, const PFS_host_name *host, const PFS_role_name *role, bool enabled, bool history)
Definition: pfs_setup_actor.cc:170
void cleanup_setup_actor_hash()
Cleanup the setup actor hash.
Definition: pfs_setup_actor.cc:144
void cleanup_setup_actor()
Cleanup all the setup actor buffers.
Definition: pfs_setup_actor.cc:64
void lookup_setup_actor(PFS_thread *thread, const PFS_user_name *user, const PFS_host_name *host, bool *enabled, bool *history)
Definition: pfs_setup_actor.cc:283
int delete_setup_actor(const PFS_user_name *user, const PFS_host_name *host, const PFS_role_name *role)
Definition: pfs_setup_actor.cc:210
int reset_setup_actor()
Definition: pfs_setup_actor.cc:256
Common definition used by mysys, performance schema and server & client.
Common definition between mysql server & client.
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:57
Performance schema internal locks (declarations).
Object names (declarations).
required bool enabled
Definition: replication_group_member_actions.proto:33
Our own string classes, used pervasively throughout the executor.
Definition: lf.h:187
Performance schema global sizing parameters.
Definition: pfs_server.h:120
Definition: pfs_name.h:522
Definition: pfs_name.h:566
Hash key for.
Definition: pfs_setup_actor.h:52
PFS_role_name m_role_name
Definition: pfs_setup_actor.h:55
PFS_host_name m_host_name
Definition: pfs_setup_actor.h:54
PFS_user_name m_user_name
Definition: pfs_setup_actor.h:53
A setup_actor record.
Definition: pfs_setup_actor.h:59
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_setup_actor.h:69
pfs_lock m_lock
Internal lock.
Definition: pfs_setup_actor.h:61
PFS_setup_actor_key m_key
Hash key.
Definition: pfs_setup_actor.h:63
bool m_history
HISTORY flag.
Definition: pfs_setup_actor.h:67
bool m_enabled
ENABLED flag.
Definition: pfs_setup_actor.h:65
Instrumented thread implementation.
Definition: pfs_instr.h:375
Definition: pfs_name.h:478
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:154