-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mysql replication enhancements (#336)
* fix: handle virtual primary keys in slow path of LOAD DATA & fall back MySQL JSON loading temporarily * Support database/table filtering in MySQL replication
- Loading branch information
Showing
14 changed files
with
355 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,23 +90,29 @@ jobs: | |
docker exec source-db dolt sql -q " | ||
CREATE DATABASE test; | ||
CREATE TABLE test.items (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO test.items VALUES (1, 'test1'), (2, 'test2');" | ||
INSERT INTO test.items VALUES (1, 'test1'), (2, 'test2'); | ||
CREATE TABLE test.skip (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO test.skip VALUES (1, 'abc'), (2, 'def');" | ||
elif [ "${{ matrix.source }}" = "mariadb" ]; then | ||
docker exec source-db mariadb -uroot -proot test -e " | ||
CREATE TABLE items (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO items VALUES (1, 'test1'), (2, 'test2');" | ||
INSERT INTO items VALUES (1, 'test1'), (2, 'test2'); | ||
CREATE TABLE skip (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO skip VALUES (1, 'abc'), (2, 'def');" | ||
else | ||
docker exec source-db mysql -uroot -proot test -e " | ||
CREATE TABLE items (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO items VALUES (1, 'test1'), (2, 'test2');" | ||
INSERT INTO items VALUES (1, 'test1'), (2, 'test2'); | ||
CREATE TABLE skip (id INT PRIMARY KEY, name VARCHAR(50)); | ||
INSERT INTO skip VALUES (1, 'abc'), (2, 'def');" | ||
fi | ||
- name: Start MyDuck Server in replica mode | ||
run: | | ||
if [ "${{ matrix.source }}" = "postgres" ]; then | ||
SOURCE_DSN="postgres://postgres:[email protected]:5432/test" | ||
else | ||
SOURCE_DSN="mysql://root:[email protected]:3306" | ||
SOURCE_DSN="mysql://root:[email protected]:3306/test?skip-tables=skip" | ||
fi | ||
docker run -d --name myduck \ | ||
|
@@ -203,6 +209,9 @@ jobs: | |
exit 1 | ||
fi | ||
# Print the logs | ||
docker logs myduck | ||
- name: Cleanup | ||
if: always() | ||
run: | | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.