Fix RWSplitSession::route_stored_query

A member variable and local variable had the same names which caused the
member variable to not be used. With the change in the member variable,
this went unnoticed.
This commit is contained in:
Markus Mäkelä
2018-04-04 20:54:46 +03:00
parent aaa8c92886
commit befc34dea7

View File

@ -176,13 +176,13 @@ bool RWSplitSession::route_stored_query()
* to wait for a response before attempting another reroute */ * to wait for a response before attempting another reroute */
while (m_query_queue) while (m_query_queue)
{ {
GWBUF* query_queue = modutil_get_next_MySQL_packet(&query_queue); GWBUF* query_queue = modutil_get_next_MySQL_packet(&m_query_queue);
query_queue = gwbuf_make_contiguous(query_queue); query_queue = gwbuf_make_contiguous(query_queue);
/** Store the query queue locally for the duration of the routeQuery call. /** Store the query queue locally for the duration of the routeQuery call.
* This prevents recursive calls into this function. */ * This prevents recursive calls into this function. */
GWBUF *temp_storage = query_queue; GWBUF *temp_storage = m_query_queue;
query_queue = NULL; m_query_queue = NULL;
// TODO: Move the handling of queued queries to the client protocol // TODO: Move the handling of queued queries to the client protocol
// TODO: module where the command tracking is done automatically. // TODO: module where the command tracking is done automatically.
@ -195,15 +195,15 @@ bool RWSplitSession::route_stored_query()
MXS_ERROR("Failed to route queued query."); MXS_ERROR("Failed to route queued query.");
} }
if (query_queue == NULL) if (m_query_queue == NULL)
{ {
/** Query successfully routed and no responses are expected */ /** Query successfully routed and no responses are expected */
query_queue = temp_storage; m_query_queue = temp_storage;
} }
else else
{ {
/** Routing was stopped, we need to wait for a response before retrying */ /** Routing was stopped, we need to wait for a response before retrying */
query_queue = gwbuf_append(temp_storage, query_queue); m_query_queue = gwbuf_append(temp_storage, m_query_queue);
break; break;
} }
} }