MXS-1931: Remove use of gw_MySQL_get_next_packet
The function implemented redundant functionality and replacement with modutil_get_next_MySQL_packet was planned. When faced with a packet header spread over multiple buffers, the packet length calculation would read past the buffer end. This is fixed by taking modutil_get_next_MySQL_packet into use. Identical behavior to the old function is achieved by calling gwbuf_make_contiguous for each packet to store them in a contiguous area of memory. This should be either removed and only done when RCAP_TYPE_CONTIGUOUS_INPUT is requested or be made an innate feature of statement based routing.
This commit is contained in:
@ -464,8 +464,6 @@ int mysql_send_custom_error(DCB *dcb, int sequence, int affected_rows, const cha
|
||||
int mysql_send_standard_error(DCB *dcb, int sequence, int errnum, const char *msg);
|
||||
int mysql_send_auth_error(DCB *dcb, int sequence, int affected_rows, const char* msg);
|
||||
|
||||
GWBUF* gw_MySQL_get_next_packet(GWBUF** p_readbuf);
|
||||
GWBUF* gw_MySQL_get_packets(GWBUF** p_readbuf, int* npackets);
|
||||
void protocol_add_srv_command(MySQLProtocol* p, mxs_mysql_cmd_t cmd);
|
||||
void protocol_remove_srv_command(MySQLProtocol* p);
|
||||
bool protocol_waits_response(MySQLProtocol* p);
|
||||
|
Reference in New Issue
Block a user