Bug #20216 RPM packaging error: mysqldumpslow requires my_print_defaults
Submitted: 2 Jun 2006 0:01 Modified: 3 Jul 2006 20:34
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:all OS:Linux (Linux)
Assigned to: Joerg Bruehe CPU Architecture:Any

[2 Jun 2006 0:01] [ name withheld ]
Description:
RPM packaging of mysql puts mysqldumpslow in the Client RPM, but it is impossible to use there because it requires my_print_defaults which is in the Server RPM.  Either mysqldumpslow should move to Server or my_print_defaults should move to Client.  Or quite possibly both: I can see a use-case for using my_print_defaults in client-only installations, but it's much harder to justify why mysqldumpslow would be useful if there's no server installed.

This gripe was originally filed against Red Hat's RPMs:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193559
but AFAICS we just copied the layout choices that had been made in MySQL AB's RPMs.  So I figured I'd ask for your input on what to do about it.

How to repeat:
Examine %files lists in mysql-5.0.22.rhel4.spec.
[26 Jun 2006 14:43] Valeriy Kravchuk
Thank you for a bug report. Sorry for the delay with it. Verified with the following steps:

1. Install client RPM.

2. Run:

suse:/home/openxs/dbs/5.0 # rpm -q -l MySQL-client-5.0.22
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_find_rows
/usr/bin/mysql_tableinfo
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqldumpslow
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/share/man/man1/msql2mysql.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqlbinlog.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/man/man1/mysqlshow.1.gz
suse:/home/openxs/dbs/5.0 # cat /usr/bin/mysqldumpslow | grep -n my_print_defau
lts
37:    my $defaults   = `my_print_defaults mysqld`;
39:     or die "Can't determine basedir from 'my_print_defaults mysqld' output:
$defaults";
45:     my $instances  = `my_print_defaults instances`;
46:     die "Can't determine datadir from 'my_print_defaults mysqld' output: $de
faults"
54:         or die "Can't determine --$opt{i}-datadir from 'my_print_defaults in
stances' output: $instances";

So, my_print_defaults is used, and is not provided in client RPM. It is a packaging bug.
[26 Jun 2006 15:27] Joerg Bruehe
"mysqldumpslow - parse and summarize the MySQL slow query log"
really belongs into the server RPM, not on the client side. I will move it.
[27 Jun 2006 16:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8327
[27 Jun 2006 16:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8330
[27 Jun 2006 17:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8336
[27 Jun 2006 18:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8346
[28 Jun 2006 10:34] Joerg Bruehe
The shell script "mysqldumpslow" has been removed from the "client" RPMs 
and inserted into the "server" RPMs.
As its purpose is to "parse and summarize the MySQL slow query log",
it really belongs onto the server side.
Also, it requires "my_print_defaults" which is contained in the server RPMs only.

This change is done for both the "generic" RPMs and the "distribution-specific" ones (for SuSE 9, RedHat 3, and RedHat 4);
and it will be effective in all release families 
(starting from 4.0.28, 4.1.21, 5.0.23, and 5.1.12-beta),
as well as in any upcoming builds for MySQL Network.
[3 Jul 2006 20:34] Paul Dubois
Noted in 4.0.28, 4.1.21, 5.0.23, 5.1.12 changelogs.