MySQL 8.0.29
Source Code Documentation
pfs_program.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 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_PROGRAM_H
24#define PFS_PROGRAM_H
25
26/**
27 @file storage/perfschema/pfs_program.h
28 Stored Program data structures (declarations).
29*/
30
31#include <sys/types.h>
32
38
40
41/**
42 Hash key for a program.
43*/
45 public:
46 /** Object type. */
48
49 /** Object Schema name. */
51
52 /** Object name. */
54};
55
57 /** Hash key */
59
60 /** Sub statement stat. */
62
63 /** Stored program stat. */
65
66 /** Refresh setup object flags. */
67 void refresh_setup_object_flags(PFS_thread *thread);
68
69 /** Reset data for this record. */
70 void reset_data();
71};
72
73int init_program(const PFS_global_param *param);
74void cleanup_program(void);
75int init_program_hash(const PFS_global_param *param);
76void cleanup_program_hash(void);
77
79
81 enum_object_type object_type,
82 const char *object_name,
83 uint object_name_length, const char *schema,
84 uint schema_length);
85
86void drop_program(PFS_thread *thread, enum_object_type object_type,
87 const char *object_name, uint object_name_length,
88 const char *schema_name, uint schema_name_length);
89#endif
Data types for columns used in the performance schema tables (declarations)
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:221
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:54
Performance schema instruments (declarations).
Object names (declarations).
LF_HASH program_hash
Definition: pfs_program.cc:48
int init_program(const PFS_global_param *param)
Initialize table EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM.
Definition: pfs_program.cc:55
void cleanup_program_hash(void)
Cleanup the program hash.
Definition: pfs_program.cc:148
void reset_esms_by_program()
Definition: pfs_program.cc:175
void drop_program(PFS_thread *thread, enum_object_type object_type, const char *object_name, uint object_name_length, const char *schema_name, uint schema_name_length)
Definition: pfs_program.cc:266
PFS_program * find_or_create_program(PFS_thread *thread, enum_object_type object_type, const char *object_name, uint object_name_length, const char *schema, uint schema_length)
Definition: pfs_program.cc:189
void cleanup_program(void)
Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM.
Definition: pfs_program.cc:65
int init_program_hash(const PFS_global_param *param)
Initialize the program hash.
Definition: pfs_program.cc:136
Statistics (declarations).
Definition: lf.h:184
Performance schema global sizing parameters.
Definition: pfs_server.h:112
Base structure for wait instruments.
Definition: pfs_instr.h:88
Hash key for a program.
Definition: pfs_program.h:44
PFS_schema_name m_schema_name
Object Schema name.
Definition: pfs_program.h:50
PFS_routine_name m_object_name
Object name.
Definition: pfs_program.h:53
enum_object_type m_type
Object type.
Definition: pfs_program.h:47
Definition: pfs_program.h:56
PFS_statement_stat m_stmt_stat
Sub statement stat.
Definition: pfs_program.h:61
PFS_sp_stat m_sp_stat
Stored program stat.
Definition: pfs_program.h:64
PFS_program_key m_key
Hash key.
Definition: pfs_program.h:58
Definition: pfs_name.h:157
Definition: pfs_name.h:113
Statistics for stored program usage.
Definition: pfs_stat.h:339
Statistics for statement usage.
Definition: pfs_stat.h:375
Instrumented thread implementation.
Definition: pfs_instr.h:372
unsigned int uint
Definition: uca-dump.cc:29