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

feat: mysql replication enhancements #336

Merged
merged 10 commits into from
Jan 2, 2025
Merged

feat: mysql replication enhancements #336

merged 10 commits into from
Jan 2, 2025

Conversation

fanyang01
Copy link
Collaborator

@fanyang01 fanyang01 commented Dec 29, 2024

Ref #329

  1. Support for Database/Table Filtering in MySQL Replication
    Added the ability to filter databases and tables during MySQL replication using a source DSN, e.g., -e SOURCE_DSN=mysql://root:[email protected]:3306/db01?schemas=db02,db03&skip-tables=t0,t1. This configuration replicates data only from db01, db02, and db03, while skipping changes to tables t0 and t1.

  2. Handling Virtual Primary Keys in the Slow Path of LOAD DATA
    Addressed issues with MySQL Shell copy utilities generating advanced LOAD DATA ... (@id, ...) SET id = FROM_BASE64(@id) statements for tables containing UUID columns. These statements were previously processed through the slower code path of the go-mysql-server framework, which did not correctly handle virtual primary keys. This resulted in errors like:
    Binder Error: There are no UNIQUE/PRIMARY KEY Indexes that refer to this table, ON CONFLICT is a no-op.
    The slow path now properly handles virtual primary keys.

  3. Test Case for Replicating MySQL JSON Columns
    Added a test case for MySQL JSON column replication. Currently, JSON columns containing string values with escaped double quotes (e.g., {"v2": "bcd\\"efg"}) cannot be read by either DuckDB v1.1.x or go-mysql-server. This limitation will be resolved with the release of DuckDB v1.2.0.

@fanyang01 fanyang01 changed the title fix: handle virtual primary keys in slow path of LOAD DATA & fall back MySQL JSON loading temporarily feat: mysql replication enhancements Jan 1, 2025
@fanyang01 fanyang01 merged commit 4c8a81d into main Jan 2, 2025
13 of 14 checks passed
fanyang01 added a commit that referenced this pull request Jan 2, 2025
* fix: handle virtual primary keys in slow path of LOAD DATA & fall back MySQL JSON loading temporarily
* Support database/table filtering in MySQL replication
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.

1 participant