Fix crash in cat
The router used the wrong capabilities and results weren't delivered as complete and contiguous packets.
This commit is contained in:
@ -55,7 +55,7 @@ json_t* Cat::diagnostics_json() const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint64_t caps = RCAP_TYPE_STMT_OUTPUT | RCAP_TYPE_STMT_INPUT;
|
const uint64_t caps = RCAP_TYPE_PACKET_OUTPUT | RCAP_TYPE_CONTIGUOUS_OUTPUT | RCAP_TYPE_STMT_INPUT;
|
||||||
|
|
||||||
uint64_t Cat::getCapabilities()
|
uint64_t Cat::getCapabilities()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -104,6 +104,7 @@ void CatSession::clientReply(GWBUF* pPacket, DCB* pDcb)
|
|||||||
if (send)
|
if (send)
|
||||||
{
|
{
|
||||||
// Increment the packet sequence number and send it to the client
|
// Increment the packet sequence number and send it to the client
|
||||||
|
mxb_assert(modutil_count_packets(pPacket) > 0);
|
||||||
GWBUF_DATA(pPacket)[3] = m_packet_num++;
|
GWBUF_DATA(pPacket)[3] = m_packet_num++;
|
||||||
MXS_SESSION_ROUTE_REPLY(pDcb->session, pPacket);
|
MXS_SESSION_ROUTE_REPLY(pDcb->session, pPacket);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user