Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate Column Schema Retrieval Issue for Older MySQL Versions using DDL Parsing #495

Open
dongwook-chan opened this issue Oct 2, 2023 · 0 comments

Comments

@dongwook-chan
Copy link
Collaborator

Description:
python-mysql-replication currently fetches column schema using the information_schema. As part of our improvements, we are transitioning to utilizing the optional metadata of the table map event to retrieve column names. However, this optional metadata is not present in versions of MySQL prior to its introduction.

Problem:
For versions of MySQL that predate the introduction of optional metadata in the table map event, we face a challenge in retrieving the column schema.

Proposed Solution:
To address this, we suggest parsing DDL statements. By intercepting and analyzing DDL statements that alter tables (like ALTER TABLE, CREATE TABLE), we can track changes in column_schema and subsequently apply these changes to our table map. This would allow us to maintain an up-to-date representation of the table structure even without relying on information_schema or the optional metadata.

Benefits:
Ensures compatibility and functionality for older MySQL versions.
Provides a robust mechanism to track table schema changes.
Reduces the dependency on information_schema which could lead to performance benefits.
Requesting feedback and thoughts on this proposed solution to ensure we cater to all MySQL versions effectively.

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

No branches or pull requests

1 participant