MySQL 8.4.2
Source Code Documentation
pfs_error.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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_ERROR_H
25#define PFS_ERROR_H
26
27/**
28 @file storage/perfschema/pfs_error.h
29 server error instrument data structures (declarations).
30*/
31
32#include <sys/types.h>
33
34#include "lf.h"
35#include "mysqld_error.h" /* For lookup */
36#include "sql/derror.h"
38
39static const int NUM_SECTIONS =
40 sizeof(errmsg_section_start) / sizeof(errmsg_section_start[0]);
41
42extern uint max_global_server_errors;
44extern uint pfs_to_server_error_map[];
45
46struct PFS_thread;
47struct PFS_account;
48struct PFS_user;
49struct PFS_host;
50
51extern server_error error_names_array[total_error_count + 2];
52
61
62int init_error(const PFS_global_param *param);
63void cleanup_error();
65#endif
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:9173
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
void cleanup_error()
Definition: pfs_error.cc:110
static const int NUM_SECTIONS
Definition: pfs_error.h:39
void reset_events_errors_by_user()
Reset table EVENTS_ERRORS_SUMMARY_BY_USER_BY_ERROR data.
Definition: pfs_error.cc:136
void reset_events_errors_by_host()
Reset table EVENTS_ERRORS_SUMMARY_BY_HOST_BY_ERROR data.
Definition: pfs_error.cc:145
server_error error_names_array[total_error_count+2]
Names of all errors defined in err_msg.txt.
Definition: pfs_error.cc:57
void reset_events_errors_by_account()
Reset table EVENTS_ERRORS_SUMMARY_BY_ACCOUNT_BY_ERROR data.
Definition: pfs_error.cc:127
uint max_session_server_errors
Definition: pfs_error.cc:43
void aggregate_account_errors(PFS_account *account)
void reset_events_errors_global()
Reset table EVENTS_ERRORS_GLOBAL_BY_ERROR data.
Definition: pfs_error.cc:150
int init_error(const PFS_global_param *param)
Definition: pfs_error.cc:66
uint lookup_error_stat_index(uint mysql_errno)
Definition: pfs_error.cc:156
void aggregate_user_errors(PFS_user *user)
void reset_events_errors_by_thread()
Reset table EVENTS_ERRORS_SUMMARY_BY_THREAD_BY_ERROR data.
Definition: pfs_error.cc:116
void aggregate_host_errors(PFS_host *host)
uint max_global_server_errors
Definition: pfs_error.cc:42
uint pfs_to_server_error_map[]
Definition: pfs_error.cc:44
Private interface for the server (declarations).
Per account statistics.
Definition: pfs_account.h:67
Performance schema global sizing parameters.
Definition: pfs_server.h:119
Per host statistics.
Definition: pfs_host.h:64
Instrumented thread implementation.
Definition: pfs_instr.h:375
Per user statistics.
Definition: pfs_user.h:63
A record describing an error message.
Definition: derror.h:39