23#ifndef DERROR_INCLUDED
24#define DERROR_INCLUDED
31#ifdef EXTRA_CODE_FOR_UNIT_TESTING
32#include "mysqld_error.h"
66#ifdef EXTRA_CODE_FOR_UNIT_TESTING
67 bool replace_msg(
int mysql_errno,
const char *new_msg) {
70 sizeof(errmsg_section_start) /
sizeof(errmsg_section_start[0]);
71 for (
int i = 0; i < num_sections; i++) {
72 if (
mysql_errno < (errmsg_section_start[i] + errmsg_section_size[i])) {
76 offset += errmsg_section_size[i];
95#ifdef CHECK_ERRMSG_FORMAT
98#include "mysqld_errmsg.h"
99#define ER_DEFAULT(X) X##_MSG
100#define ER_THD(T, X) X##_MSG
const char * lookup(int mysql_errno)
Return error message string for a given error number.
Definition: derror.cc:86
const char * get_language() const
What language is this error message set for?
Definition: derror.h:92
const char ** errmsgs
Definition: derror.h:57
bool is_loaded() const
Has the error message file been successfully loaded?
Definition: derror.h:83
MY_LOCALE_ERRMSGS(const char *lang_par)
Definition: derror.h:60
const char * language
Definition: derror.h:56
void destroy()
Deallocate error message strings.
Definition: derror.cc:348
bool read_texts()
Read the error message file and initialize strings.
Definition: derror.cc:218
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
int errmsgs_reload(THD *thd)
CHARSET_INFO * error_message_charset_info
Character set of the buildin error messages loaded from errmsg.sys.
Definition: derror.cc:50
int mysql_symbol_to_errno(const char *error_symbol)
Definition: sql_state.cc:54
const char * error_message_for_error_log(int mysql_errno)
Get the error-message corresponding to the given MySQL error-code, or nullptr if no message is availa...
Definition: derror.cc:155
int mysql_errno_to_builtin(uint mysql_errno)
Find the error message record for a given MySQL error code in the array of registered messages.
Definition: derror.cc:65
const char * ER_THD(const THD *thd, int mysql_errno)
Definition: derror.cc:102
const char * ER_DEFAULT(int mysql_errno)
Definition: derror.cc:98
const char * error_message_for_client(int mysql_errno)
Get the error-message corresponding to the given MySQL error-code, or nullptr if no message is availa...
Definition: derror.cc:174
const char * ER_DEFAULT_NONCONST(int mysql_errno)
Definition: derror.cc:106
const char * mysql_errno_to_symbol(int mysql_errno)
Definition: sql_state.cc:50
const char * ER_THD_NONCONST(const THD *thd, int mysql_errno)
Definition: derror.cc:110
bool init_errmessage()
Read the error message file, initialize and register error messages for all languages.
Definition: derror.cc:180
void deinit_errmessage()
Unregister error messages for all languages.
Definition: derror.cc:202
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
Some integer typedefs for easier portability.
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:9062
Definition: m_ctype.h:382
A record describing an error message.
Definition: derror.h:38
uint mysql_errno
MySQL error code (consecutive within sections)
Definition: derror.h:40
uint error_index
consecutive. 0 for obsolete.
Definition: derror.h:44
const char * name
MySQL error symbol ("ER_STARTUP")
Definition: derror.h:39
const char * jdbc_state
JBDC state.
Definition: derror.h:43
const char * odbc_state
SQL state.
Definition: derror.h:42
const char * text
MySQL error message.
Definition: derror.h:41
unsigned int uint
Definition: uca9-dump.cc:74