Get the App
SLTechnology News&Howtos  ›  Database  › 

The Timestamp timestamp is accurate to the subtle level and bug appears.

Shulou Source: shulou.com Published: 2022-06-01 08:08:06 10月05日 Update

The timestamp timestamp is accurate to the subtle level and bug appears.

Since the MariaDB5.3 version, the timestamp timestamp has been accurate to a subtle level, but there is a fatal bug that can corrupt the contents of the binlog record, invalidate the flashback recovery function, and fail to grab the binlog by the Canal tool.

Affect version MariaDB 5.5 Universe 10.0

Reproduce:

The version I use is 10.0.29-MariaDB-enterprise

Binlog format is ROW (this BUG does not exist in Mixed)

To create a table structure, note: timestamp (6), precise to subtle

Create table hcy (create_time timestamp (6) NOT NULL DEFAULT CURRENT_TIMESTAMP (6))

Insert data

Insert into hcy (create_time) values (now ())

At this point, we look at the BINLOG file, as shown in the following figure:

1. Time becomes negative.

2 、 Corrupted replication event was detected. Corruption of the copy was detected.

3. The lower version 10.0 may cause master-slave synchronization to fail.

The bug was fixed in MariaDB version 10.1.

Official confirmation of bug address

Https://jira.mariadb.org/browse/MDEV-5377

Tags: Version subtle precise time level master-slave content function address official tool data file format structure negative number synchronization influence detection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno Xiaomi Microsoft vpn