-
Couldn't load subscription status.
- Fork 690
Parse ALTER TABLE ADD/DROP COLUMN statement and sync table_map
#511
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
Draft
dongwook-chan
wants to merge
2
commits into
julien-duponchelle:main
from
python-mysql-replication-kr:feature/parse-ddl
Draft
Parse ALTER TABLE ADD/DROP COLUMN statement and sync table_map
#511
dongwook-chan
wants to merge
2
commits into
julien-duponchelle:main
from
python-mysql-replication-kr:feature/parse-ddl
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed that a recent change in the repository removed the ability to select from information_schema to retrieve column_schema. Instead, it was chosen to parse the optional metadata present in the table map event to obtain this schema. I understand the rationale behind this, but there's a caveat: if binlog_row_metadata is set to FULL, the optional metadata isn't always fully available. This can lead to incomplete or incorrect column schemas.
To address this gap, I've developed a feature that parses the DDL from the query event and updates the table_map accordingly. This ensures that even when binlog_row_metadata is set to FULL, we can accurately and consistently retrieve the column schema.
Changes Made:
Implemented DDL parsing from query events.
Updated table_map to reflect changes from parsed DDL.
Added necessary unit tests to ensure correctness and stability of the new feature.
Benefits:
Ensures that column schemas are always accurate, even when binlog_row_metadata is set to FULL.
Reduces reliance on optional metadata which might be incomplete.
I'd appreciate it if you could review the changes and provide feedback. I believe this enhancement can add robustness to the way column schemas are determined, ensuring accuracy and consistency for all configurations.