MXS-1203: Improve resultset processing functions

The functions used to track the resultset EOF packets now expose the
position of the end of the result set. This allows the modules that use
them to check if more results exist in the same buffer.

Added the status bits for OK and EOF packets to the mysql.h protocol
header. This can be used to check for various state changes that happen in
the session. Currently the status bits are only used to detect if more
results are expected.
This commit is contained in:
Markus Mäkelä
2017-04-03 14:40:06 +03:00
parent a1c7ee438d
commit d7258fffd0
5 changed files with 131 additions and 75 deletions

View File

@ -700,8 +700,9 @@ gw_read_and_write(DCB *dcb)
expecting_resultset(proto) &&
mxs_mysql_is_result_set(read_buffer))
{
int more = 0;
if (modutil_count_signal_packets(read_buffer, 0, 0, &more) != 2)
bool more = false;
size_t offset = 0;
if (modutil_count_signal_packets(read_buffer, 0, &more, &offset) != 2)
{
dcb->dcb_readqueue = read_buffer;
return 0;