MySQL 8.3.0
Source Code Documentation
pfs_error.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2023, 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
38static const int NUM_SECTIONS =
39 sizeof(errmsg_section_start) / sizeof(errmsg_section_start[0]);
40
41extern uint max_global_server_errors;
43extern uint pfs_to_server_error_map[];
44
45struct PFS_thread;
46struct PFS_account;
47struct PFS_user;
48struct PFS_host;
49
50extern server_error error_names_array[total_error_count + 2];
51
60
61int init_error(const PFS_global_param *param);
62void cleanup_error();
64#endif
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:9108
char * user
Definition: mysqladmin.cc:64
const char * host
Definition: mysqladmin.cc:63
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:66
Performance schema global sizing parameters.
Definition: pfs_server.h:118
Per host statistics.
Definition: pfs_host.h:63
Instrumented thread implementation.
Definition: pfs_instr.h:374
Per user statistics.
Definition: pfs_user.h:62
A record describing an error message.
Definition: derror.h:38