Closed GoogleCodeExporter closed 9 years ago
Actually, I think this is not Maatkit. It's mysqldump, which you would
probably see
if you examine the MKDEBUG output. Please confirm.
Summary "option parser behaves differently 1877 vs 2442" changed.
Original comment by baron.schwartz
on 18 Nov 2008 at 1:50
Sorry for not being clear.
Ok, options are parsed in the same way:
Old:
# main:2089 Args for mysqldump: mkdir, -p, /tmp/abc/%D/20081118-161530, ;,
mysqldump,
--skip-lock-tables, %D, %N, |, filter_dump, |, bzip2, >,
/tmp/abc/%D/20081118-161530/%N.bz2
New:
# main:2165 Args for mysqldump: mkdir, -p, /tmp/abc/%D/20081118-161530, ;,
mysqldump,
--skip-lock-tables, %D, %N, |, filter_dump, |, bzip2, >,
/tmp/abc/%D/20081118-161530/%N.bz2
But the command is executed differently.
Sorry but I can't find anything usefu with
MKDEBUG=1 so I used strace -fF -e trace=process
Old version:
[pid 18143] execve("/bin/sh", ["sh", "-c", "mkdir -p
/tmp/abc/DBNAME/20081118-161530
; mysqldump --skip-lock-tables DBNAME DBTABLE | filter
_dump | bzip2 > /tmp/abc/DBNAME/20081118-161530/DBTABLE.bz2"], [...]
New version:
[pid 27618] execve("/bin/sh", ["sh", "-c", "mkdir -p
\'/tmp/abc/DBNAME/20081118-161530\' \';\' mysqldump --skip-lock-tables
\'DBNAME\'
DBTABLE | filter_dump | bzip2 >
\'/tmp/abc/DBNAME/20081118-161530/DBTABLE.bz2\'"] [...]
So basically in the first version sh use ; as command separator and
in the last as paramenter.
The first version allow more than one command, the last not.
No solution is right by /default/.
The first is more flexible.
But I could try to wrap my commands in my own script to accomodate the
change.
Thanks again.
Original comment by i...@matrixcom.it
on 18 Nov 2008 at 4:11
I think the way system() is called was changed, though I have not investigated
yet.
Before I do, I'd like to know whether you'd like to just a) put your commands
in your
own script or b) add some options so the dump program moves things to the
current-date directory and uses bzip2 instead of gzip?
Original comment by baron.schwartz
on 24 Nov 2008 at 12:02
Sorry for the delay.
I finally put my commands in my own script.
Thanks
Original comment by i...@matrixcom.it
on 29 Dec 2008 at 1:53
Looks like there is no need for this one. If this becomes an issue in the
future, we
can modify the tool to prefix all options with "--loose-".
Original comment by baron.schwartz
on 3 May 2009 at 3:02
Original issue reported on code.google.com by
i...@matrixcom.it
on 14 Nov 2008 at 10:14