Bug #21359 mysqldumpslow: show the database name in the output
Submitted: 31 Jul 2006 9:36 Modified: 30 Nov 2009 14:43
Reporter: Thierry Randrianiriana (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[31 Jul 2006 9:36] Thierry Randrianiriana
We have a problem with mysqldumpslow, we can't known the database name in
the output, it isn't a problem with 1 or 2 databases but we have 10k db
and it's hard to optimize without the database name.

We would like to parse the output with a script in the goal to add index in the field and we want to know the db name.

We patched the script:

Count: 2  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=1.0 (2), root[root]@localhost


Count: 2  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=1.0 (2), Database: webfinance root[root]@localhost
Please integrate the patch, thank you in advance.

How to repeat:
mysqldumpslow /var/log/mysql/mysql-slow.log

Suggested fix:
We can apply the patch.
[31 Jul 2006 9:37] Thierry Randrianiriana

Attachment: mysqldumpslow.patch (text/x-patch), 2.02 KiB.

[31 Jul 2006 12:39] Valeriy Kravchuk
Thank you for a reasonable feature request and patch.
[13 Jul 2009 15:22] liz drachnik
Hello Thierry - 

 In order for us to continue the process of reviewing your contribution
 to MySQL - We need you to review and sign the Sun|MySQL contributor
 agreement (the "SCA")

 The process is explained here:

 Getting a signed/approved SCA on file will help us facilitate your
 contribution-- this one, and others in the future.

 Thank you !

 Liz Drachnik  - Program Manager - MySQL
[3 Sep 2009 5:54] Thierry Randrianiriana
I just sent my signed Sun Contributor Agreement to sun_ca [at] sun [dot] com .