MySQL 8.0.29
Source Code Documentation
pfs_setup_actor.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2022, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PFS_SETUP_ACTOR_H
24#define PFS_SETUP_ACTOR_H
25
26/**
27 @file storage/perfschema/pfs_setup_actor.h
28 Performance schema setup actors (declarations).
29*/
30
31#include <sys/types.h>
32
33#include "lf.h"
34#include "my_hostname.h" /* HOSTNAME_LENGTH */
35#include "mysql_com.h"
36#include "sql_string.h"
40
41struct PFS_global_param;
42struct PFS_thread;
43class PFS_opaque_container_page;
44
45/**
46 @addtogroup performance_schema_buffers
47 @{
48*/
49
50/** Hash key for @sa PFS_setup_actor. */
55};
56
57/** A setup_actor record. */
59 /** Internal lock. */
61 /** Hash key. */
63 /** ENABLED flag. */
65 /** HISTORY flag. */
67 /** Container page. */
68 PFS_opaque_container_page *m_page;
69};
70
71int init_setup_actor(const PFS_global_param *param);
72void cleanup_setup_actor(void);
75
77 const PFS_role_name *role, bool enabled, bool history);
79 const PFS_role_name *role);
80int reset_setup_actor(void);
81long setup_actor_count(void);
82
84 const PFS_host_name *host, bool *enabled,
85 bool *history);
86
87/** Update derived flags for all setup_actors. */
89
90/* For show status. */
91
93
94/** @} */
95#endif
int init_setup_actor_hash(const PFS_global_param *param)
Initialize the setup actor hash.
Definition: pfs_setup_actor.cc:130
long setup_actor_count()
Definition: pfs_setup_actor.cc:275
int init_setup_actor(const PFS_global_param *param)
Initialize the setup actor buffers.
Definition: pfs_setup_actor.cc:58
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:49
void cleanup_setup_actor(void)
Cleanup all the setup actor buffers.
Definition: pfs_setup_actor.cc:63
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:169
void cleanup_setup_actor_hash(void)
Cleanup the setup actor hash.
Definition: pfs_setup_actor.cc:143
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:282
int delete_setup_actor(const PFS_user_name *user, const PFS_host_name *host, const PFS_role_name *role)
Definition: pfs_setup_actor.cc:209
int reset_setup_actor()
Definition: pfs_setup_actor.cc:255
Common definition used by mysys, performance schema and server & client.
Common definition between mysql server & client.
char * user
Definition: mysqladmin.cc:59
const char * host
Definition: mysqladmin.cc:58
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:54
Performance schema internal locks (declarations).
Object names (declarations).
required bool enabled
Definition: replication_group_member_actions.proto:32
Our own string classes, used pervasively throughout the executor.
Definition: lf.h:184
Performance schema global sizing parameters.
Definition: pfs_server.h:112
Definition: pfs_name.h:241
Definition: pfs_name.h:262
Hash key for.
Definition: pfs_setup_actor.h:51
PFS_role_name m_role_name
Definition: pfs_setup_actor.h:54
PFS_host_name m_host_name
Definition: pfs_setup_actor.h:53
PFS_user_name m_user_name
Definition: pfs_setup_actor.h:52
A setup_actor record.
Definition: pfs_setup_actor.h:58
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_setup_actor.h:68
pfs_lock m_lock
Internal lock.
Definition: pfs_setup_actor.h:60
PFS_setup_actor_key m_key
Hash key.
Definition: pfs_setup_actor.h:62
bool m_history
HISTORY flag.
Definition: pfs_setup_actor.h:66
bool m_enabled
ENABLED flag.
Definition: pfs_setup_actor.h:64
Instrumented thread implementation.
Definition: pfs_instr.h:372
Definition: pfs_name.h:220
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:151