MySQL 8.4.2
Source Code Documentation
|
#include <stddef.h>
#include <sys/types.h>
#include "my_compiler.h"
#include "mysql_com.h"
#include "field_types.h"
#include "my_command.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_time.h"
#include "sql/protocol.h"
#include "violite.h"
Go to the source code of this file.
Classes | |
class | Protocol_classic |
class | Protocol_text |
Class used for the old (MySQL 4.0 protocol). More... | |
class | Protocol_binary |
Functions | |
bool | net_send_error (THD *thd, uint sql_errno, const char *err) |
Send a error string to client. More... | |
bool | net_send_error (NET *net, uint sql_errno, const char *err) |
Send a error string to client using net struct. More... | |
uchar * | net_store_data (uchar *to, const uchar *from, size_t length) |
bool | store (Protocol *prot, I_List< i_string > *str_list) |
Send a set of strings as one long string with ',' in between. More... | |
bool net_send_error | ( | NET * | net, |
uint | sql_errno, | ||
const char * | err | ||
) |
Send a error string to client using net struct.
This is used initial connection handling code.
net | Low-level net struct |
sql_errno | The error code to send |
err | A pointer to the error message |
false | The message was sent to the client |
true | An error occurred and the message wasn't sent properly |
bool net_send_error | ( | THD * | thd, |
uint | sql_errno, | ||
const char * | err | ||
) |
Send a error string to client.
Design note:
net_printf_error and net_send_error are low-level functions that shall be used only when a new connection is being established or at server startup.
For SIGNAL/RESIGNAL and GET DIAGNOSTICS functionality it's critical that every error that can be intercepted is issued in one place only, my_message_sql.
thd | Thread handler |
sql_errno | The error code to send |
err | A pointer to the error message |
false | The message was sent to the client |
true | An error occurred and the message wasn't sent properly |