Bug #4452 mysqladmin flush-logs result in Refresh
Submitted: 8 Jul 2004 3:07 Modified: 8 Jul 2004 9:13
Reporter: michael lee Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:4.0.20 OS:Linux (RedHat 8.0)
Assigned to: CPU Architecture:Any

[8 Jul 2004 3:07] michael lee
When execute following:
/usr/bin/mysqladmin flush-logs

The general query log shows:

		    487 Connect     root@localhost on 
		    487 Refresh    
/usr/sbin/mysqld-max, Version: 4.0.20-Max-log, started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
040708  4:02:08	    487 Quit       

How to repeat:
Refer to Description
[8 Jul 2004 6:04] Paul DuBois
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

mysqladmin refresh and mysqladmin flush-logs both are
types of refresh operations, so both show up that way in
the log.
[8 Jul 2004 6:31] michael lee
If i issue the command flush logs thru mysql, the log show "flush logs" not Refresh.

It seems that Refresh will perform much more than "flush log" (such as flushs tables, query cache). I want "flush logs" and then perform logrotate for log maintenance task. Therefore, if refresh is used, it may affect the performance. Moreover, mysqladmin already have a command "refresh" to perform the refresh command.

I have heard before that introduce "flush logs" is to solve reduce the overhead associated with "refresh"

[8 Jul 2004 9:13] Sergei Golubchik
mysqladmin uses a protocol level command (COM_REFRESH), not as SQL command (where protocol command would be COM_QUERY, with the query text as a parameter). COM_REFRESH has a parameter too, that tells MySQL what exactly to flush, so flush-logs does what you want :)
[8 Jul 2004 9:22] michael lee
Thank you for your clarification.