Assert that query queue contains complete packets

The query queue in readwritesplit must not contain partial packets. If it
does, something is broken as only complete packets should ever be in it.
This commit is contained in:
Markus Mäkelä 2018-07-19 21:28:16 +03:00
parent ee6e2b28b2
commit 30ac15817f
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -471,6 +471,7 @@ static bool route_stored_query(RWSplitSession *rses)
{
GWBUF* query_queue = modutil_get_next_MySQL_packet(&rses->query_queue);
query_queue = gwbuf_make_contiguous(query_queue);
ss_dassert(query_queue);
/** Store the query queue locally for the duration of the routeQuery call.
* This prevents recursive calls into this function. */