Fix handling of large result packets
The RWBackend didn't know to skip the tail end of large packets.
This commit is contained in:
parent
e9cc79d623
commit
d3bfe0a712
@ -156,6 +156,7 @@ private:
|
||||
bool m_local_infile_requested; /**< Whether a LOCAL INFILE was requested */
|
||||
ResponseStat m_response_stat;
|
||||
uint64_t m_num_coldefs = 0;
|
||||
bool m_skip_next = false;
|
||||
|
||||
inline bool is_opening_cursor() const
|
||||
{
|
||||
|
@ -296,6 +296,17 @@ void RWBackend::process_packets(GWBUF* result)
|
||||
auto end = std::next(it, len);
|
||||
uint8_t cmd = *it;
|
||||
|
||||
// Ignore the tail end of a large packet large packet. Only resultsets can generate packets this large
|
||||
// and we don't care what the contents are and thus it is safe to ignore it.
|
||||
bool skip_next = m_skip_next;
|
||||
m_skip_next = len == GW_MYSQL_MAX_PACKET_LEN;
|
||||
|
||||
if (skip_next)
|
||||
{
|
||||
it = end;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (m_reply_state)
|
||||
{
|
||||
case REPLY_STATE_START:
|
||||
|
Loading…
x
Reference in New Issue
Block a user