dm icon indicating copy to clipboard operation
dm copied to clipboard

dm mariadb binlog parse timestamp panic

Open wentaojin opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe

mariadb v10.0.10 upgrade to v10.1.44

It is found that the precision of the column mariadb timestamp(3) is not recorded in the binlog, and DM parses it according to the default precision (4), which causes a panic. After google, it was found that it was a bug in mariadb, https://jira.mariadb.org/browse/MDEV-5377. The bug was fixed after 10.1, but after testing, the binlog of the table that already existed before the upgrade from 10.1 still has this problem, and the table created after the upgrade has no problem.

Temporary Solution: alter table changes TIMESTAMP(N), TIME(N), DATETIME(N) to the default precision The newly installed version after mariadb 10.1, as the slave library of the original mariadb, DM synchronizes the slave library

Describe the feature you'd like

I hope that DM can be automatically processing and reduce manual upstream database operations. The parameters or table structure definition changes during the operation of the upstream database will be cautious.

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

wentaojin avatar Nov 23 '21 13:11 wentaojin

I don't think this makes sense because it was an upstream bug and I think we need not be compatible with bugs.

GMHDBJD avatar Nov 23 '21 14:11 GMHDBJD

Also the panic is happen in go-mysql, maybe we can disscuss in https://github.com/go-mysql-org/go-mysql

GMHDBJD avatar Nov 23 '21 14:11 GMHDBJD

#1682 #924

GMHDBJD avatar Nov 25 '21 05:11 GMHDBJD

#1682 #924

this requires we couple block allow lists into go-mysql 🤔maybe we can learn native mysql replication’s balist interface

lance6716 avatar Nov 25 '21 05:11 lance6716