MySQL 8.4.0
Source Code Documentation
protocol_classic.h File Reference
#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...
 
ucharnet_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...
 

Function Documentation

◆ net_send_error() [1/2]

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.

Parameters
netLow-level net struct
sql_errnoThe error code to send
errA pointer to the error message
Return values
falseThe message was sent to the client
trueAn error occurred and the message wasn't sent properly

◆ net_send_error() [2/2]

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.

Parameters
thdThread handler
sql_errnoThe error code to send
errA pointer to the error message
Return values
falseThe message was sent to the client
trueAn error occurred and the message wasn't sent properly

◆ net_store_data()

uchar * net_store_data ( uchar to,
const uchar from,
size_t  length 
)

◆ store()

bool store ( Protocol prot,
I_List< i_string > *  str_list 
)

Send a set of strings as one long string with ',' in between.