ISSUES-4006 fix fast build warning and remove binlog file name

This commit is contained in:
BohuTANG 2020-08-25 16:57:28 +08:00
parent d8e88499a5
commit d01f4d38eb
3 changed files with 6 additions and 7 deletions

View File

@ -36,7 +36,7 @@ void GTIDSets::parse(const String gtid_format)
boost::split(server_ids, gset, [](char c) { return c == ':'; });
GTIDSet set;
set.uuid = stringToUUID(server_ids[0].data());
set.uuid = stringToUUID(server_ids[0]);
for (size_t k = 1; k < server_ids.size(); k++)
{

View File

@ -37,11 +37,11 @@ void RegisterSlave::writePayloadImpl(WriteBuffer & buffer) const
}
BinlogDumpGTID::BinlogDumpGTID(UInt32 server_id_, String gtid_datas_)
: flags(0x04), server_id(server_id_), binlog_file_name(""), gtid_datas(std::move(gtid_datas_))
: flags(0x04), server_id(server_id_), gtid_datas(std::move(gtid_datas_))
{
}
size_t BinlogDumpGTID::getPayloadSize() const { return 1 + 2 + 4 + 4 + binlog_file_name.size() + 8 + 4 + gtid_datas.size(); }
size_t BinlogDumpGTID::getPayloadSize() const { return 1 + 2 + 4 + 4 + 0 + 8 + 4 + gtid_datas.size(); }
void BinlogDumpGTID::writePayloadImpl(WriteBuffer & buffer) const
{
@ -49,10 +49,10 @@ void BinlogDumpGTID::writePayloadImpl(WriteBuffer & buffer) const
buffer.write(reinterpret_cast<const char *>(&flags), 2);
buffer.write(reinterpret_cast<const char *>(&server_id), 4);
UInt32 file_size = binlog_file_name.size();
// Binlog file.
UInt32 file_size = 0;
buffer.write(reinterpret_cast<const char *>(&file_size), 4);
buffer.write(binlog_file_name.data(), binlog_file_name.size());
buffer.write("", 0);
const UInt64 position = 4;
buffer.write(reinterpret_cast<const char *>(&position), 8);

View File

@ -43,7 +43,6 @@ class BinlogDumpGTID : public IMySQLWritePacket
public:
UInt16 flags;
UInt32 server_id;
String binlog_file_name;
String gtid_datas;
protected: