Clean up common binlogrouter headers

Cleaned up blr_constants.h and moved the REP_HEADER construction helper
into binlog_common.h.
This commit is contained in:
Markus Mäkelä
2018-06-11 09:33:23 +03:00
parent 8721c9117a
commit ac6370afcf
3 changed files with 14 additions and 42 deletions

View File

@ -389,19 +389,7 @@ void Rpl::add_create(STableCreateEvent create)
}
}
REP_HEADER construct_header(uint8_t* ptr)
{
REP_HEADER hdr;
hdr.timestamp = EXTRACT32(ptr);
hdr.event_type = ptr[4];
hdr.serverid = EXTRACT32(&ptr[5]);
hdr.event_size = extract_field(&ptr[9], 32);
hdr.next_pos = EXTRACT32(&ptr[13]);
hdr.flags = EXTRACT16(&ptr[17]);
return hdr;
}
bool read_header(Avro* router, unsigned long long pos, REP_HEADER* hdr, avro_binlog_end_t* rc)
{