Skip to content

Fix CREATE TABLE parsing with multiple spaces #163

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

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

bakwc
Copy link
Owner

@bakwc bakwc commented Jun 29, 2025

Fixes #160

Problem: Replication was failing with "unknown mysql type" when CREATE TABLE had multiple spaces between column name and type.

Changes:

  • Use split() instead of split(' ') to handle multiple spaces properly
  • Add test case to prevent regression

The issue happened because split(' ') creates empty strings with multiple spaces, making the parser extract empty field types instead of the actual type like "bigint".

- Handle multiple consecutive spaces in field definitions
- Add test case to reproduce issue #160
- Fixes 'unknown mysql type' error during realtime replication
@bakwc bakwc merged commit 0a53255 into master Jun 29, 2025
1 check passed
@bakwc bakwc deleted the fix-issue-160-mysql-type-parsing branch June 29, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Replication Fails When Adding New Table
1 participant