Skip to content

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
jaredmdobson pushed a commit to ReMatter/mysql_ch_replicator that referenced this pull request Nov 5, 2025
Fix parsing bug with multiple spaces in CREATE TABLE

- Handle multiple consecutive spaces in field definitions  
- Add test case to reproduce issue bakwc#160
- Fixes 'unknown mysql type' error during realtime replication

Fixes bakwc#160
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

2 participants