MXS-1873: Collect results for all session commands

To work around the limitation in the session command handling and
multi-part results, all session commands are now treated as gathered
results. This allows session commands which return result sets to be used
with MaxScale.

This change should not cause problems with practical workloads as they
usually do not return massive resultsets for session commands.

The optimal way to handle the multi-part responses would be to integrate
it into the result completion tracking process. This would allow the
prepared statement IDs to be extracted while the command is being
processed.
This commit is contained in:
Markus Mäkelä 2018-05-17 19:24:42 +03:00
parent 2a7f470b6b
commit 8067f312a1
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -337,11 +337,11 @@ bool route_session_write(RWSplitSession *rses, GWBUF *querybuf,
bool expecting_response = mxs_mysql_command_will_respond(command);
int nsucc = 0;
uint64_t lowest_pos = id;
gwbuf_set_type(querybuf, GWBUF_TYPE_COLLECT_RESULT);
if (qc_query_is_type(type, QUERY_TYPE_PREPARE_NAMED_STMT) ||
qc_query_is_type(type, QUERY_TYPE_PREPARE_STMT))
{
gwbuf_set_type(querybuf, GWBUF_TYPE_COLLECT_RESULT);
rses->ps_manager.store(querybuf, id);
}