MXS-2587: Never route stored queries in routeQuery
This could end up in infinite mutual recursion if no responses are expected. Although this does not happen now that MXS-2587 is fixed, the code should not even be there.
This commit is contained in:
parent
7270ff7ac0
commit
e516c11ac5
@ -175,24 +175,15 @@ int32_t RWSplitSession::routeQuery(GWBUF* querybuf)
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* We are already processing a request from the client. Store the
|
||||
* new query and wait for the previous one to complete.
|
||||
*/
|
||||
mxb_assert(m_expected_responses > 0 || !m_query_queue.empty());
|
||||
// We are already processing a request from the client. Store the new query and wait for the previous
|
||||
// one to complete.
|
||||
MXS_INFO("Storing query (len: %d cmd: %0x), expecting %d replies to current command",
|
||||
gwbuf_length(querybuf),
|
||||
GWBUF_DATA(querybuf)[4],
|
||||
m_expected_responses);
|
||||
gwbuf_length(querybuf), GWBUF_DATA(querybuf)[4], m_expected_responses);
|
||||
mxb_assert(m_expected_responses > 0 || !m_query_queue.empty());
|
||||
m_query_queue.emplace_back(querybuf);
|
||||
querybuf = NULL;
|
||||
rval = 1;
|
||||
mxb_assert(m_expected_responses != 0);
|
||||
|
||||
if (m_expected_responses == 0 && !route_stored_query())
|
||||
{
|
||||
rval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (querybuf != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user