Bug #10608 mysqladmin breaks on "database" variable in my.cnf
Submitted: 12 May 2005 19:20 Modified: 21 Dec 2006 20:26
Reporter: Martin Mokrejs Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (linux-2.6.11.9)
Assigned to: Magnus BlÄudd CPU Architecture:Any

[12 May 2005 19:20] Martin Mokrejs
Description:
It seems mysqladmin still breaks on certain variables specified in [client] section.
One of them is "database". Also, "max_allowed_packet" is not recognized and causes mysqldmin to die. Finally, I know about the "loose-max_allowed_packet" version of the same ... it doesn't make it die, but why does it issue the warning then?

Last, why don't you tag those messages with "Error: " or "Info: " prefixes? Are they errors or not?

How to repeat:
$ mysqladmin drop test || echo failed
mysqladmin: unknown variable 'database=ires'
failed
$ mysqladmin --version
mysqladmin: unknown variable 'database=ires'
$ mysqladmin -V       
mysqladmin: unknown variable 'database=ires'
$ 

$ mysqladmin drop test || echo failed
mysqladmin: unknown variable 'max_allowed_packet=1G'
failed
$

$ mysqladmin drop test || echo failed
mysqladmin: unknown variable 'loose-max_allowed_packet=1G'
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.

Do you really want to drop the 'test' database [y/N] N

OK, aborting database drop!
failed
$
[13 May 2005 1:55] MySQL Verification Team
Currently that is the expected behavior as documented in the Manual:

http://dev.mysql.com/doc/mysql/en/option-files.html

 so that other people cannot find out your password.) Be sure not to put an option in the [client] group unless it is recognized by all client programs that you use. Programs that do not understand the option quit after displaying an error message if you try to run them.
[13 May 2005 10:11] Sergei Golubchik
--loose change an error to a warning, that's how it's defined. It may be useful to know that an option was ignored. And even if sometimes it's just a noise, in other cases it may be important.

As for Error: Info: prefixes - agree, we can fix it.
[10 Nov 2006 12:25] 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/15128

ChangeSet@1.2556, 2006-11-10 13:25:10+01:00, msvensson@neptunus.(none) +4 -0
  Bug#10608 mysqladmin breaks on "database" variable in my.cnf
   - Add printout of "Warning" or "Note" for non error messages in default_reporter
   - Add test for the above in new mysqladmin.test
[21 Dec 2006 20:26] Paul DuBois
No changelog entry needed.