MXS-1752: Remove EOF packet generation

The creation of the EOF packet is not needed as the last packet of a
result set is always guaranteed to be of the correct type. This also
allows non-resultsets to be correctly processed as the internal packet
number will be at 0 when the last result arrives.

Cleaned up some of the function names and changed the signatures to be
better suited for their use-cases.

Use angle bracket includes, combine some of the more unwieldly
conditionals into functions, added more comments.
This commit is contained in:
Markus Mäkelä
2018-03-31 13:39:48 +03:00
parent 4966fb9e96
commit 89df068ed5
2 changed files with 26 additions and 31 deletions

View File

@ -77,6 +77,10 @@ private:
mxs::SRWBackendList::iterator m_current;
GWBUF* m_query;
// Skip over unused backend servers
void skip_unused();
};
/**
* Iterate to next backend
*
* @return True if m_current points to a valid backend that is in use
*/
bool next_backend();
};