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

--rows SMALLINT support #237

Closed
ihanick opened this issue Mar 6, 2020 · 9 comments · Fixed by #260
Closed

--rows SMALLINT support #237

ihanick opened this issue Mar 6, 2020 · 9 comments · Fixed by #260
Assignees

Comments

@ihanick
Copy link

ihanick commented Mar 6, 2020

16-bit integers are still could be useful to produce a specific amount of --rows in output files:
For example in case of: create table t(id1 smallint, id2 int, c char(200), primary key(id1,id2));
we can create a backup with:

mydumper --user=root --password=secret --regex '^test[.]t$' --rows 60000

wc -l export-20200306-034008/test.t.0*sql|head
   72824 export-20200306-034008/test.t.00000.sql
   70853 export-20200306-034008/test.t.00001.sql

Could be done after a trivial patch:

diff --git a/mydumper.c b/mydumper.c 
index 903d816..b0a2ba6 100644 
--- a/mydumper.c 
+++ b/mydumper.c 
@@ -2217,6 +2217,7 @@ GList *get_chunks_for_table(MYSQL *conn, char *database, char *table, 
   case MYSQL_TYPE_LONG: 
   case MYSQL_TYPE_LONGLONG: 
   case MYSQL_TYPE_INT24: 
+  case MYSQL_TYPE_SHORT: 
     /* static stepping */ 
     nmin = strtoll(min, NULL, 10); 
     nmax = strtoll(max, NULL, 10);
@maxbube maxbube self-assigned this Mar 18, 2020
@maxbube
Copy link
Collaborator

maxbube commented Apr 15, 2020

Hi @ihanick , I guess is not a problem to include it. could you please send a PR? If not don't worry I will do it for next release.

Cheers

@VMEMachuca
Copy link

This change was not included in v0.10.1

@davidducos
Copy link
Member

@VMEMachuca this will be included in v0.10.3

@davidducos davidducos added this to the Release 0.10.3 milestone Mar 2, 2021
@davidducos davidducos linked a pull request Mar 2, 2021 that will close this issue
@VMEMachuca
Copy link

VMEMachuca commented Mar 2, 2021

@davidducos it seems like this change would be available on v.0.10.3 which is expected to be out in March

@davidducos
Copy link
Member

@VMEMachuca you are right, yesterday I have been working on the packages, so it might be released next week.

@VMEMachuca
Copy link

@davidducos - Is the release still on schedule? If yes, where would I be able to find it?

@davidducos
Copy link
Member

Hi @VMEMachuca, the draft of the new release is already prepared. As soon as I get a review, I will be publishing. I take the opportunity to ask for collaborators, I'm trying to keep the project as updated as possible, so, any help is welcome!

@VMEMachuca
Copy link

Hi @davidducos, I had never participated in such an effort but, would you mind to elaborate for me? I would love to be able to collaborate with you.

@davidducos
Copy link
Member

@VMEMachuca, we need people that want to:

  • review the code on PR which also implies to test it.
  • review issues and give support to other users or create PR with fixes.
  • implement feature requested or internal projects based on alignments that we want for MyDumper. For instance, currently, we don't have a good testing platform, would be nice to discuss what is the best approach.
    If you want to help, you might need to start reviewing issues and giving your opinion, it will be much appreciated!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants