Fix query queuing on session command execution
If session command execution during server reconnection caused a query to be queued, the query would be put on the tail end of the queue. This would cause queries to be reordered if the queue wasn't empty. The correct thing to do would be to put the next pending query back at the front of the queue.
This commit is contained in:
@ -336,7 +336,7 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
|||||||
else if (target->has_session_commands())
|
else if (target->has_session_commands())
|
||||||
{
|
{
|
||||||
// We need to wait until the session commands are executed
|
// We need to wait until the session commands are executed
|
||||||
m_query_queue.emplace_back(gwbuf_clone(querybuf));
|
m_query_queue.emplace_front(gwbuf_clone(querybuf));
|
||||||
MXS_INFO("Queuing query until '%s' completes session command", target->name());
|
MXS_INFO("Queuing query until '%s' completes session command", target->name());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user