0

We are working with a MariaDb 10.4.14 and we stream the binlog with the Debezium suite. We encounter an issue because the Timestamp in the binlog streamer is a uint32 which does not provide a millisecond precision.

Do you know if it is possible to get this precision by changing a config in MariaDb or Debezium for example?

Dharman
  • 30,962
  • 25
  • 85
  • 135
kiki
  • 563
  • 4
  • 17

1 Answers1

1

No, it isn't possible, since timestamp is stored in a 32-bit integer.

The header/description format is defined as follows (from MySQL Connector/C mariadb_rpl.h):

struct st_mariadb_rpl_format_description_event
{
  uint16_t format;
  char *server_version;
  uint32_t timestamp;
  uint8_t header_len;
};

The protocol implementation for a format_description binary log event can be found at the FORMAT_DESCRIPTION_EVENT of Client/Server protocol

Changing timestamp from uint32_t e.g. to uint64_t or MYSQL_TIME would break the protocol and therefore entire replication but also existing applications which read the binary log.

Georg Richter
  • 5,970
  • 2
  • 9
  • 15
  • Hi, I am not sure I understand exactly what you mean. It is very blocking as it means. you cannot use binlogs to replicate a db in another db format. If I understand well, you mean there is no way to order the actions in the db using the binlogs and that. can't been changed whatever db config you enforce. – kiki Nov 18 '20 at 17:13
  • You asked if it is possible to get microseconds precision and I tried to explain why it is not possible - Now you have a complete different question. – Georg Richter Nov 19 '20 at 05:13