Merge branch '2.2' into 2.3

This commit is contained in:
Markus Mäkelä
2018-12-17 23:52:56 +02:00
9 changed files with 85 additions and 17 deletions

View File

@ -694,24 +694,25 @@ static inline bool complete_ps_response(GWBUF* buffer)
if (mxs_mysql_extract_ps_response(buffer, &resp))
{
int expected_eof = 0;
int expected_packets = 1;
if (resp.columns > 0)
{
expected_eof++;
// Column definition packets plus one for the EOF
expected_packets += resp.columns + 1;
}
if (resp.parameters > 0)
{
expected_eof++;
// Parameter definition packets plus one for the EOF
expected_packets += resp.parameters + 1;
}
bool more;
int n_eof = modutil_count_signal_packets(buffer, 0, &more, NULL);
int n_packets = modutil_count_packets(buffer);
MXS_DEBUG("Expecting %u EOF, have %u", n_eof, expected_eof);
MXS_DEBUG("Expecting %u packets, have %u", n_packets, expected_packets);
rval = n_eof == expected_eof;
rval = n_packets == expected_packets;
}
return rval;

View File

@ -104,6 +104,10 @@ bool RWBackend::write(GWBUF* buffer, response_type type)
// Any non-zero flag value means that we have an open cursor
m_opening_cursor = flags != 0;
}
else if (cmd == MXS_COM_STMT_CLOSE)
{
m_ps_handles.erase(it);
}
else if (cmd == MXS_COM_STMT_FETCH)
{
// Number of rows to fetch is a 4 byte integer after the ID