MySQL 9.1.0
Source Code Documentation
pfs_program.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 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_PROGRAM_H
25#define PFS_PROGRAM_H
26
27/**
28 @file storage/perfschema/pfs_program.h
29 Stored Program data structures (declarations).
30*/
31
32#include <sys/types.h>
33
39
41
42/**
43 Hash key for a program.
44*/
46 public:
47 /** Object type. */
49
50 /** Object Schema name. */
52
53 /** Object name. */
55};
56
58 /** Hash key */
60
61 /** Sub statement stat. */
63
64 /** Stored program stat. */
66
67 /** Refresh setup object flags. */
68 void refresh_setup_object_flags(PFS_thread *thread);
69
70 /** Reset data for this record. */
71 void reset_data();
72};
73
74int init_program(const PFS_global_param *param);
75void cleanup_program();
76int init_program_hash(const PFS_global_param *param);
78
80
82 enum_object_type object_type,
83 const char *object_name,
84 uint object_name_length, const char *schema,
85 uint schema_name_length);
86
87void drop_program(PFS_thread *thread, enum_object_type object_type,
88 const char *object_name, uint object_name_length,
89 const char *schema_name, uint schema_name_length);
90#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:227
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:57
Performance schema instruments (declarations).
Object names (declarations).
LF_HASH program_hash
Definition: pfs_program.cc:50
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_name_length)
Definition: pfs_program.cc:191
int init_program(const PFS_global_param *param)
Initialize table EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM.
Definition: pfs_program.cc:57
void cleanup_program()
Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_PROGRAM.
Definition: pfs_program.cc:67
void cleanup_program_hash()
Cleanup the program hash.
Definition: pfs_program.cc:150
void reset_esms_by_program()
Definition: pfs_program.cc:177
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:268
int init_program_hash(const PFS_global_param *param)
Initialize the program hash.
Definition: pfs_program.cc:138
Statistics (declarations).
Definition: lf.h:187
Performance schema global sizing parameters.
Definition: pfs_server.h:124
Base structure for wait instruments.
Definition: pfs_instr.h:91
Hash key for a program.
Definition: pfs_program.h:45
PFS_schema_name m_schema_name
Object Schema name.
Definition: pfs_program.h:51
PFS_routine_name m_object_name
Object name.
Definition: pfs_program.h:54
enum_object_type m_type
Object type.
Definition: pfs_program.h:48
Definition: pfs_program.h:57
PFS_statement_stat m_stmt_stat
Sub statement stat.
Definition: pfs_program.h:62
PFS_sp_stat m_sp_stat
Stored program stat.
Definition: pfs_program.h:65
PFS_program_key m_key
Hash key.
Definition: pfs_program.h:59
Definition: pfs_name.h:293
Definition: pfs_name.h:194
Statistics for stored program usage.
Definition: pfs_stat.h:340
Statistics for statement usage.
Definition: pfs_stat.h:376
Instrumented thread implementation.
Definition: pfs_instr.h:375