MXS-2464: Bring back the runtime query queue check
The code that checked that only non-empty queries are stored in the query queue was left out when the query queue fix was backported to 2.3. Since MXS-2464 is caused by a still unknown bug, the runtime check should help figure out in which cases the problem occurs.
This commit is contained in:
parent
1c820f6ae3
commit
bf63698991
@ -225,6 +225,14 @@ bool RWSplitSession::route_stored_query()
|
||||
auto query = std::move(m_query_queue.front());
|
||||
m_query_queue.pop_front();
|
||||
|
||||
if (!query.get())
|
||||
{
|
||||
MXS_ALERT("MXS-2464: Query in query queue unexpectedly null. Queue has %lu queries left.",
|
||||
m_query_queue.size());
|
||||
mxb_assert(!true);
|
||||
continue;
|
||||
}
|
||||
|
||||
/** Store the query queue locally for the duration of the routeQuery call.
|
||||
* This prevents recursive calls into this function. */
|
||||
decltype(m_query_queue) temp_storage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user