Skip to content

Conversation

@nielsreijers
Copy link
Contributor

Two fixes:

  • CREATE TABLE IF NOT EXISTS already worked if the table didn't exist, but still tried to create it a second time if it did, so I passed it on from mysql_structure to clickhouse_structure and modified the CREATE statement
  • DROP TABLE IF EXISTS didn't work for similar reasons. I tried to follow the pattern for CREATE to fix this.

If you prefer an issue to be opened for fixes like this, then let me know and I'll open one

@bakwc
Copy link
Owner

bakwc commented Jan 3, 2025

Looks good, for the future it's worth adding some unit-tests / modifying existing tests so they start checking this case too.

@bakwc bakwc merged commit 50ba885 into bakwc:master Jan 3, 2025
1 check passed
jaredmdobson pushed a commit to ReMatter/mysql_ch_replicator that referenced this pull request Nov 5, 2025
* Fix "DROP TABLE IF EXISTS"

* Fix "CREATE TABLE IF NOT EXISTS"
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.

2 participants