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

fix split partitions #1419

Merged
merged 1 commit into from
Mar 6, 2024
Merged

fix split partitions #1419

merged 1 commit into from
Mar 6, 2024

Conversation

007gzs
Copy link
Contributor

@007gzs 007gzs commented Mar 1, 2024

when run mydumper with --split-partitions , tables without partition will be skip;

@007gzs
Copy link
Contributor Author

007gzs commented Mar 1, 2024

db sql:

create table no_p (id int not null ,PRIMARY KEY (`id`))ENGINE=InnoDB;
create table has_p (id int not null ,PRIMARY KEY (`id`))ENGINE=InnoDB PARTITION BY KEY (id) PARTITIONS 4;
insert into no_p(id) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
insert into has_p(id) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19);

run arg:
./mydumper -h 127.0.0.1 -p root --split-partitions -P 3306 -u root -a -B mydumper_test -o ./test_sql -t 1 --less-locking -v 3 -F 500 -L test_sql.log

res:

ll test_sql
total 36
drwxr-x--- 2 ljuser ljuser 4096 Mar  1 17:28 ./
drwxrwxr-x 5 ljuser ljuser 4096 Mar  1 17:28 ../
-rw-rw-r-- 1 ljuser ljuser  534 Mar  1 17:28 metadata
-rw-rw---- 1 ljuser ljuser  338 Mar  1 17:28 mydumper_0.has_p.00000.sql
-rw-rw---- 1 ljuser ljuser  340 Mar  1 17:28 mydumper_0.has_p.00001.sql
-rw-rw---- 1 ljuser ljuser  410 Mar  1 17:28 mydumper_0.has_p-schema.sql
-rw-rw---- 1 ljuser ljuser  362 Mar  1 17:28 mydumper_0.no_p-schema.sql
-rw-rw---- 1 ljuser ljuser  392 Mar  1 17:28 mydumper_0-schema-create.sql
-rw-rw---- 1 ljuser ljuser  230 Mar  1 17:28 mydumper_0-schema-triggers.sql


@davidducos davidducos added this to the Release 0.16.1-1 milestone Mar 6, 2024
@davidducos davidducos added the Fix label Mar 6, 2024
@davidducos davidducos merged commit 575e3da into mydumper:master Mar 6, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants