You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG#24595459 - XPLUGIN: SERVER DOES NOT SEEM TO RESPOND TO "0-SIZED" MESSAGES CORRECTLY
Description
===========
When client sends zero length message, X Plugin doesn't respond to that. After next following
messages client receives an error E_X_BAD_MESSAGE and gets disconnected (it depends on next
message header content).
Analyzis
========
The X Protocol message consist from header and payload. The header contains only the
payload lenght (4 bytes). First byte in payload is message type, after which comes the protobuf
binary content. X Plugin always reads 5 bytes, thus sending message with "0-payload" transmits
only the 4 bytes what causes out-of-sync on X Protocol packet layer.
Fix
===
* X Plugin is going to read first 4 bytes, in case of zero lenght it is going to send back
`Mysqlx.Error` message with error ER_X_BAD_MESSAGE (5000) and text
"Messages without payload are not supported", in case of valid lenght it is going to read
whole payload and take the message type from the first byte.
* renamed status variable 'Mysqlx_unknown_message_type' to 'Mysqlx_errors_unknown_message_type'
which was introduced in BUG#24611754
Reviewed-by: Grzegorz Szwarc <[email protected]>
Reviewed by: Alfredo Kojima <[email protected]>
RB: 14231
0 commit comments