mydumper -r can not handle negative index
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Data Dumper |
Triaged
|
Medium
|
Max Bubenick |
Bug Description
when i use mydumper -r to dump a blog database (this blog use a negative primary key). mydumer master thread hung. and dump thread can not get job to do.
i found the codes in get_chunks_
/* This is estimate, not to use as guarantee! Every chunk would have eventual adjustments */
guint64 estimated_chunks = rows / rows_per_file;
guint64 estimated_step, nmin, nmax, cutoff;
/* Support just bigger INTs for now, very dumb, no verify approach */
switch (fields[0].type) {
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_
case MYSQL_TYPE_INT24:
/* static stepping */
nmin = strtoll(
nmax = strtoll(
estimated_step = (nmax-nmin)
cutoff = nmin;
while(
chunks=
!
!
!
!
field, (unsigned long long)cutoff,
field, (unsigned long long)(cutoff+
cutoff+
showed_nulls=1;
}
default:
goto cleanup;
}
nmin and nmax should be gint64, not guint64
may the codes below is correct:
/* This is estimate, not to use as guarantee! Every chunk would have eventual adjustments */
gint64 estimated_chunks = rows / rows_per_file;
gint64 estimated_step, nmin, nmax, cutoff;
/* Support just bigger INTs for now, very dumb, no verify approach */
switch (fields[0].type) {
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_
case MYSQL_TYPE_INT24:
/* static stepping */
nmin = strtoll(
nmax = strtoll(
estimated_step = (nmax-nmin)
cutoff = nmin;
while(
chunks=
!
!
!
!
field, (long long)cutoff,
field, (long long)(cutoff+
cutoff+
showed_nulls=1;
}
default:
goto cleanup;
}
Changed in mydumper: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Max Bubenick (max-bubenick) |
milestone: | none → 0.9.3 |