2020-09-15 12:28:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <IO/ReadBuffer.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class MySQLBinlogEventReadBuffer : public ReadBuffer
|
|
|
|
{
|
|
|
|
protected:
|
2020-11-19 04:02:43 +00:00
|
|
|
static const size_t MAX_CHECKSUM_SIGNATURE_LENGTH = 4;
|
|
|
|
|
2020-09-15 12:28:42 +00:00
|
|
|
ReadBuffer & in;
|
2021-05-08 15:35:09 +00:00
|
|
|
size_t checksum_signature_length = 0;
|
2020-09-15 12:28:42 +00:00
|
|
|
|
|
|
|
size_t checksum_buff_size = 0;
|
|
|
|
size_t checksum_buff_limit = 0;
|
2021-05-08 15:35:09 +00:00
|
|
|
char checksum_buf[MAX_CHECKSUM_SIGNATURE_LENGTH]{};
|
2020-09-15 12:28:42 +00:00
|
|
|
|
|
|
|
bool nextImpl() override;
|
|
|
|
|
|
|
|
public:
|
2020-09-16 03:13:17 +00:00
|
|
|
~MySQLBinlogEventReadBuffer() override;
|
|
|
|
|
2020-11-16 13:46:36 +00:00
|
|
|
MySQLBinlogEventReadBuffer(ReadBuffer & in_, size_t checksum_signature_length_);
|
2020-09-15 12:28:42 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|