Fix forwarding of 'SERVER_SESSION_STATE_CHANGED' status to clients #4023

Right now server session state isn't tracked for backend connections,
so we don't include this information in the generated OK packet. Because
of this, we should never report of this status change to clients.
pull/4050/head
Javier Jaramago Fernández 4 years ago
parent 4b10567042
commit 2bbeba1845

@ -533,6 +533,8 @@ bool MySQL_Protocol::generate_pkt_OK(bool send, void **ptr, unsigned int *len, u
internal_status |= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
}
}
// Always remove 'SERVER_SESSION_STATE_CHANGED', since we don't track this information right now
internal_status &= ~SERVER_SESSION_STATE_CHANGED;
memcpy(_ptr+l, &internal_status, sizeof(uint16_t)); l+=sizeof(uint16_t);
memcpy(_ptr+l, &warnings, sizeof(uint16_t)); l+=sizeof(uint16_t);
if (msg && strlen(msg)) {

Loading…
Cancel
Save