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