Bug #9136 my_print_defaults changed behaviour between 4.1.7 and 4.1.10a
Submitted: 11 Mar 2005 23:29 Modified: 19 May 2005 1:18
Reporter: Tim Bishop Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.1.10a OS:Solaris (Solaris 9)
Assigned to: Jim Winstead CPU Architecture:Any

[11 Mar 2005 23:29] Tim Bishop
Description:
Here is a test config file:

% cat test.cnf 
[client]
port = 1234
% 

Here is what happens with my_print_defaults on 4.1.7:

% /usr/local/packages/mysql-4.1.7/bin/my_print_defaults -c ./test.cnf client
--port=1234
% /usr/local/packages/mysql-4.1.7/bin/my_print_defaults -e ./test.cnf client
--port=1234
% 

With both -c and -e the same result is given. However, with 4.1.10a:

% /usr/local/packages/mysql-4.1.10a/bin/my_print_defaults -c ./test.cnf client
--port=1234
% /usr/local/packages/mysql-4.1.10a/bin/my_print_defaults -e ./test.cnf client
% 

So nothing happens with -e. This reason this is a signifcant problem for me is that in the mysql.server script it has the lines:

extra_args=""
if test "$datadir" != "/home/pkg/mysql/data-4.1.10a"
then
  extra_args="-e $datadir/my.cnf"
fi

So when I explicitly change my data directory it no longer picks up the the my.cnf file within it, which causes mysql.server to fail.

Is this an intentional "feature"? If so, I'll work around it. But I'm filing this incase it's an unintentional bug.

Thanks.

How to repeat:
See above.

Suggested fix:
Restore 4.1.7 functionality if this is a bug.
[13 Mar 2005 13:34] Hartmut Holzgraefe
behavior changed somewhere btw. 4.1.8 and 4.1.9
[15 Mar 2005 23:54] 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/internals/23065
[8 Apr 2005 12:54] Tim Bishop
Is this meant to be fixed in 4.1.11? I saw this in the announcement:

     * Fixed   a  bug  in  my_print_defaults  that  made  it  ignore
       the --defaults-extra-file and --defaults-file options.

But I've tested it and it still appears to be broken.
[8 Apr 2005 14:14] Jim Winstead
No, apparently the bug fixed there was a different one. The patch for this bug is still pending review.
[8 Apr 2005 17:39] Michael Stassen
It's hard to imagine what that could be, as this is the only bug reported for my_print_defaults.  More to the point, I can detect no difference between 4.1.10 and 4.1.11 in the behavior of my_print_defaults with respect to the --defaults-extra-file and --defaults-file options .  The latter works, the former does not.  It seems more likely the announcement is simply wrong.
[8 Apr 2005 20:59] Sergei Golubchik
Changelog in the manual refers to the following change

http://mysql.bkbits.net:8080/mysql-4.1/cset@42177cb3_D-4rKJtNPBca7FQCANfYQ
[9 Apr 2005 13:58] MySQL Verification Team
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fixed in Changeset 1.2055 and available in 4.1.11
[9 Apr 2005 14:30] Jim Winstead
Sorry, Sinisa is incorrect. This is not fixed in 4.1.11.
[27 Apr 2005 0:33] 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/internals/24342
[2 May 2005 19:07] Jim Winstead
Fixed in 4.1.12 and 5.0.6.
[19 May 2005 1:18] Paul DuBois
Noted in 4.1.12, 5.0.6 changelogs.
[20 May 2005 8:30] Tim Bishop
Just confirming for the record that 4.1.12 fixes the problem.