new client error added: CR_MALFORMED_PACKET
This commit is contained in:
parent
b4302479a3
commit
44db958ba2
@ -28,7 +28,7 @@ extern const char *client_errors[]; /* Error messages */
|
|||||||
|
|
||||||
#define CR_MIN_ERROR 2000 /* For easier client code */
|
#define CR_MIN_ERROR 2000 /* For easier client code */
|
||||||
#define CR_MAX_ERROR 2999
|
#define CR_MAX_ERROR 2999
|
||||||
#if defined(OS2) && defined( MYSQL_SERVER)
|
#if defined(OS2) && defined(MYSQL_SERVER)
|
||||||
#define CER(X) client_errors[(X)-CR_MIN_ERROR]
|
#define CER(X) client_errors[(X)-CR_MIN_ERROR]
|
||||||
#else
|
#else
|
||||||
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
|
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
|
||||||
@ -51,8 +51,8 @@ extern const char *client_errors[]; /* Error messages */
|
|||||||
#define CR_SERVER_LOST 2013
|
#define CR_SERVER_LOST 2013
|
||||||
#define CR_COMMANDS_OUT_OF_SYNC 2014
|
#define CR_COMMANDS_OUT_OF_SYNC 2014
|
||||||
#define CR_NAMEDPIPE_CONNECTION 2015
|
#define CR_NAMEDPIPE_CONNECTION 2015
|
||||||
#define CR_NAMEDPIPEWAIT_ERROR 2016
|
#define CR_NAMEDPIPEWAIT_ERROR 2016
|
||||||
#define CR_NAMEDPIPEOPEN_ERROR 2017
|
#define CR_NAMEDPIPEOPEN_ERROR 2017
|
||||||
#define CR_NAMEDPIPESETSTATE_ERROR 2018
|
#define CR_NAMEDPIPESETSTATE_ERROR 2018
|
||||||
#define CR_CANT_READ_CHARSET 2019
|
#define CR_CANT_READ_CHARSET 2019
|
||||||
#define CR_NET_PACKET_TOO_LARGE 2020
|
#define CR_NET_PACKET_TOO_LARGE 2020
|
||||||
@ -62,3 +62,5 @@ extern const char *client_errors[]; /* Error messages */
|
|||||||
#define CR_PROBE_SLAVE_CONNECT 2024
|
#define CR_PROBE_SLAVE_CONNECT 2024
|
||||||
#define CR_PROBE_MASTER_CONNECT 2025
|
#define CR_PROBE_MASTER_CONNECT 2025
|
||||||
#define CR_SSL_CONNECTION_ERROR 2026
|
#define CR_SSL_CONNECTION_ERROR 2026
|
||||||
|
#define CR_MALFORMED_PACKET 2027
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ const char *client_errors[]=
|
|||||||
"Error on SHOW SLAVE HOSTS:",
|
"Error on SHOW SLAVE HOSTS:",
|
||||||
"Error connecting to slave:",
|
"Error connecting to slave:",
|
||||||
"Error connecting to master:",
|
"Error connecting to master:",
|
||||||
"SSL connection error"
|
"SSL connection error",
|
||||||
|
"Malformed packet"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
|
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
|
||||||
@ -84,7 +85,8 @@ const char *client_errors[]=
|
|||||||
"Error on SHOW SLAVE HOSTS:",
|
"Error on SHOW SLAVE HOSTS:",
|
||||||
"Error connecting to slave:",
|
"Error connecting to slave:",
|
||||||
"Error connecting to master:",
|
"Error connecting to master:",
|
||||||
"SSL connection error"
|
"SSL connection error",
|
||||||
|
"Malformed packet"
|
||||||
};
|
};
|
||||||
|
|
||||||
#else /* ENGLISH */
|
#else /* ENGLISH */
|
||||||
@ -116,7 +118,8 @@ const char *client_errors[]=
|
|||||||
"Error on SHOW SLAVE HOSTS:",
|
"Error on SHOW SLAVE HOSTS:",
|
||||||
"Error connecting to slave:",
|
"Error connecting to slave:",
|
||||||
"Error connecting to master:",
|
"Error connecting to master:",
|
||||||
"SSL connection error"
|
"SSL connection error",
|
||||||
|
"Malformed packet"
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -985,7 +985,7 @@ static MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
|||||||
if (to+len > end_to)
|
if (to+len > end_to)
|
||||||
{
|
{
|
||||||
free_rows(result);
|
free_rows(result);
|
||||||
net->last_errno=CR_UNKNOWN_ERROR;
|
net->last_errno=CR_MALFORMED_PACKET;
|
||||||
strmov(net->last_error,ER(net->last_errno));
|
strmov(net->last_error,ER(net->last_errno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user