commented about endianness

This commit is contained in:
Yuriy 2019-07-19 22:29:44 +03:00
parent 34a4d6a57a
commit be589ed825

View File

@ -18,7 +18,8 @@
#include <sstream>
#include <IO/LimitReadBuffer.h>
/// Implementation of MySQL wire protocol
/// Implementation of MySQL wire protocol.
/// Works only on little-endian architecture.
namespace DB
{
@ -212,6 +213,12 @@ public:
{
PacketPayloadReadBuffer payload(in, sequence_id);
readPayload(payload);
if (!payload.eof())
{
std::stringstream tmp;
tmp << "Packet payload is not fully read. Stopped after " << payload.count() << " bytes, while " << payload.available() << " bytes are in buffer.";
throw ProtocolError(tmp.str(), ErrorCodes::UNKNOWN_PACKET_FROM_CLIENT);
}
}
virtual void readPayload(ReadBuffer & buf) = 0;