Remove unused buffer types
A part of the buffer types weren't used or provided no real functionality.
This commit is contained in:
@ -564,13 +564,9 @@ static int routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session,
|
||||
{
|
||||
closed_session_reply(querybuf);
|
||||
}
|
||||
else
|
||||
else if (route_single_stmt(inst, rses, querybuf))
|
||||
{
|
||||
live_session_reply(&querybuf, rses);
|
||||
if (route_single_stmt(inst, rses, querybuf))
|
||||
{
|
||||
rval = 1;
|
||||
}
|
||||
rval = 1;
|
||||
}
|
||||
|
||||
if (querybuf != NULL)
|
||||
|
@ -47,7 +47,6 @@ do{ \
|
||||
bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
|
||||
GWBUF *querybuf);
|
||||
void closed_session_reply(GWBUF *querybuf);
|
||||
void live_session_reply(GWBUF **querybuf, ROUTER_CLIENT_SES *rses);
|
||||
void print_error_packet(ROUTER_CLIENT_SES *rses, GWBUF *buf, DCB *dcb);
|
||||
void check_session_command_reply(GWBUF *writebuf, sescmd_cursor_t *scur, backend_ref_t *bref);
|
||||
bool execute_sescmd_in_backend(backend_ref_t *backend_ref);
|
||||
|
@ -312,37 +312,6 @@ void closed_session_reply(GWBUF *querybuf)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Probably MySQL specific because of modutil function
|
||||
*/
|
||||
/**
|
||||
* @brief First step to handle request in a live session
|
||||
*
|
||||
* Used when a request is about to be routed. Note that the query buffer is
|
||||
* passed by name and is likely to be modified by this function.
|
||||
*
|
||||
* @param querybuf Query buffer containing packet
|
||||
* @param rses Router session
|
||||
*/
|
||||
void live_session_reply(GWBUF **querybuf, ROUTER_CLIENT_SES *rses)
|
||||
{
|
||||
GWBUF *tmpbuf = *querybuf;
|
||||
if (GWBUF_IS_TYPE_UNDEFINED(tmpbuf))
|
||||
{
|
||||
/* Note that many modutil functions are MySQL specific */
|
||||
*querybuf = modutil_get_complete_packets(&tmpbuf);
|
||||
if (tmpbuf)
|
||||
{
|
||||
rses->client_dcb->dcb_readqueue = gwbuf_append(rses->client_dcb->dcb_readqueue, tmpbuf);
|
||||
}
|
||||
*querybuf = gwbuf_make_contiguous(*querybuf);
|
||||
|
||||
/** Mark buffer to as MySQL type */
|
||||
gwbuf_set_type(*querybuf, GWBUF_TYPE_MYSQL);
|
||||
gwbuf_set_type(*querybuf, GWBUF_TYPE_SINGLE_STMT);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Uses MySQL specific mechanisms
|
||||
*/
|
||||
|
@ -96,7 +96,6 @@ bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
|
||||
bool non_empty_packet;
|
||||
|
||||
ss_dassert(querybuf->next == NULL); // The buffer must be contiguous.
|
||||
ss_dassert(!GWBUF_IS_TYPE_UNDEFINED(querybuf));
|
||||
|
||||
/* packet_type is a problem as it is MySQL specific */
|
||||
packet_type = determine_packet_type(querybuf, &non_empty_packet);
|
||||
|
Reference in New Issue
Block a user