After suggestions by Sinisa on ways to improve my mysqldump progress patch I finally got around to working on these improvements.

This new patch has an extra parameter --show-progress-size which by default is set to 10,000.  So when --verbose is used, every 10,000 lines you will get a status output of the number of rows for a particular table dumped.  So what you should see is something along these lines:

shell> mysqldump -A --verbose >out.sql
-- Connecting to localhost...
-- Retrieving table structure for table testing...
-- Sending SELECT query...
-- Retrieving rows...
-- 10000 of ~94347 rows dumped for table `testing`
-- 20000 of ~94347 rows dumped for table `testing`
-- 30000 of ~94347 rows dumped for table `testing`
-- 40000 of ~94347 rows dumped for table `testing`
...

shell> mysqldump -A --show-progress-size=1500 --verbose >out.sql
-- Connecting to localhost...
-- Retrieving table structure for table testing...
-- Sending SELECT query...
-- Retrieving rows...
-- 1500 of ~94347 rows dumped for table `testing`
-- 3000 of ~94347 rows dumped for table `testing`
-- 4500 of ~94347 rows dumped for table `testing`
-- 6000 of ~94347 rows dumped for table `testing`

With mysqldump \r is used for this output so it will in fact all show on a single line rather than multi-line.  This new patch can be found here.

Comments:

Looks really good.
Upload to ourdelta.org pls.

Posted by jonathan on January 20, 2009 at 09:30 PM GMT #

Hi Jonathan,

I don't really work on OurDelta so don't really know their processes. But they are welcome to adapt my patches just as Drizzle did with the original patches. I would imagine they may work without modification on OurDelta.

Posted by LinuxJedi on January 21, 2009 at 04:38 PM GMT #

Could you update this to work in 5.1.31-* (community and ent). I would really love if you use CenOS5.2 if you could just send me the replacement mysqldump executable to test with, as I always build from offical ent rpms for support ability. That way i could have alias mysqldump="/usr/local/3rdParty/mysqldump.with.progress".

Please let me know.

Posted by David Murphy on March 18, 2009 at 04:07 PM GMT #

Hi David,

I'm sure I can sort something out for you (whether it be a SRPM or a binary). I personally use Fedora 10 here but I may be able to get a CentOS VM working for this.

If you email me on Andrew.Hutchings@Sun.COM we can sort out the details.

Posted by LinuxJedi on March 18, 2009 at 04:26 PM GMT #

Hi LinuxJedi :-)

Why don't you submit this patch through the "bugs db" or the "internals" list which are the main bi-directionally-open public channels for contributing code to MySQL? (I would recommend the "bugs db" for now.)

This way a public conversation of this patch can occur and everyone will know when/how/where it will be absorbed, etc.

You can tag it as a contribution so if finds its way to our reviews of contributions ...

Assuming you're already a Sun employee, you will not need to sign the SCA. Otherwise, signing it will greatly facilitate the review.

See here: http://forge.mysql.com/wiki/Contributing_Code

Please send me a note if you have any questions.

Posted by M. Mortazavi on March 30, 2009 at 07:14 AM BST #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by LinuxJedi