MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / writePayload

Method writePayload

src/Core/MySQL/IMySQLWritePacket.cpp:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16void IMySQLWritePacket::writePayload(WriteBuffer & buffer, uint8_t & sequence_id) const
17{
18 MySQLPacketPayloadWriteBuffer buf(buffer, getPayloadSize(), sequence_id);
19 writePayloadImpl(buf);
20 buf.finalize();
21 if (buf.remainingPayloadSize())
22 {
23 throw Exception(ErrorCodes::LOGICAL_ERROR, "Incomplete payload. Written {} bytes, expected {} bytes.",
24 getPayloadSize() - buf.remainingPayloadSize(), getPayloadSize());
25 }
26}
27
28size_t getLengthEncodedNumberSize(uint64_t x)
29{

Callers 1

sendPacketMethod · 0.80

Calls 3

remainingPayloadSizeMethod · 0.80
ExceptionClass · 0.50
finalizeMethod · 0.45

Tested by

no test coverage detected