aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/IO/MySQLBinlogEventReadBuffer.h
blob: 7212a548844489c28819777dee1a58b06e3c8891 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <IO/ReadBuffer.h>

namespace DB
{

class MySQLBinlogEventReadBuffer : public ReadBuffer
{
protected:
    static const size_t MAX_CHECKSUM_SIGNATURE_LENGTH = 4;

    ReadBuffer & in;
    size_t checksum_signature_length = 0;

    size_t checksum_buff_size = 0;
    size_t checksum_buff_limit = 0;
    char checksum_buf[MAX_CHECKSUM_SIGNATURE_LENGTH]{};

    bool nextImpl() override;

public:
    ~MySQLBinlogEventReadBuffer() override;

    MySQLBinlogEventReadBuffer(ReadBuffer & in_, size_t checksum_signature_length_);

};


}