Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

dm mariadb binlog parse timestamp panic #2281

Open
wentaojin opened this issue Nov 23, 2021 · 4 comments
Open

dm mariadb binlog parse timestamp panic #2281

wentaojin opened this issue Nov 23, 2021 · 4 comments

Comments

@wentaojin
Copy link
Contributor

wentaojin commented Nov 23, 2021

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

@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Nov 23, 2021

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

@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Nov 23, 2021

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

@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Nov 25, 2021

#1682 #924

@lance6716
Copy link
Collaborator

#1682 #924

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants