Fix schemarouter query queue

If the schemarouter service used a filter, any queued queries would end up
being routed twice for them as well. This would break any filters that
would expect a result for each query and it could also cause a hang if the
filter did not forward it up to the router.

The correct thing to do is to call the routeQuery method of the router
directly.
This commit is contained in:
Markus Mäkelä
2021-12-21 12:39:59 +02:00
parent 47a47db79e
commit d57de28199

View File

@ -1077,15 +1077,8 @@ void SchemaRouterSession::route_queued_query()
GWBUF* tmp = m_queue.front().release();
m_queue.pop_front();
#ifdef SS_DEBUG
char* querystr = modutil_get_SQL(tmp);
MXS_DEBUG("Sending queued buffer for session %p: %s",
m_client->session,
querystr);
MXS_FREE(querystr);
#endif
poll_add_epollin_event_to_dcb(m_client, tmp);
MXS_INFO("Routing queued query: %s", mxs::extract_sql(tmp).c_str());
session_delay_routing(m_pSession, router_as_downstream(m_pSession), tmp, 0);
}
/**