>Description: To make myself clear, I am talking about the binary update log file. When specifing a fixed filename in my.cnf and running the flush-logs command (via mysqladmin) MySQL does not close the file and open the new file when run by a logrotate script. This does work correctly if no log filename is specified.
>How-To-Repeat: THIS WORKS.... File: my.cnf ... # Uncomment the following if you want to log updates log-bin ... File: log-files rotate script ... /home/mysql/data/raq804-bin.001 { create 600 mysqldb mysqldb notifempty daily rotate 14 missingok nocompress postrotate # just if mysqld is really running # if test -n "`ps acx|grep mysqld`"; then /usr/local/mysql/bin/mysqladmin flush-logs # fi endscript } ... THIS DOESN'T..... File: my.cnf ... # Uncomment the following if you want to log updates log-bin=update.log ... File: log-files rotate script ... /home/mysql/data/update.log { create 600 mysqldb mysqldb notifempty daily rotate 14 missingok nocompress postrotate # just if mysqld is really running # if test -n "`ps acx|grep mysqld`"; then /usr/local/mysql/bin/mysqladmin flush-logs # fi endscript } ... The results of the above can be shown below. During the running of the logrotate script a PHP-based script is individually adding 100,000 rows using single INSERT statements [root@raq804 data]# l -rt total 3328 drwxr-x--- 2 mysqldb mysqldb 1024 May 10 11:41 test drwxr-x--- 2 mysqldb mysqldb 1024 Jul 31 01:41 mysql drwxrwxr-x 3 root root 1024 Oct 15 19:27 .. drwx------ 2 mysqldb mysqldb 1024 Oct 15 19:43 filler -rw-rw-r-- 1 root mysqldb 1512 Oct 29 23:56 log-files -rw-rw---- 1 mysqldb mysqldb 13 Oct 29 23:58 update.index -rw-rw---- 1 mysqldb mysqldb 5 Oct 29 23:58 raq804.uk2net.com.pid -rw-rw-r-- 1 mysqldb mysqldb 83 Oct 29 23:58 raq804.uk2net.com.err drwxr-x--- 6 mysqldb mysqldb 1024 Oct 29 23:58 . -rw-rw---- 1 mysqldb mysqldb 3382049 Oct 29 23:59 update.log [root@raq804 data]# logrotate -f log-files [root@raq804 data]# l -rt total 5857 drwxr-x--- 2 mysqldb mysqldb 1024 May 10 11:41 test drwxr-x--- 2 mysqldb mysqldb 1024 Jul 31 01:41 mysql drwxrwxr-x 3 root root 1024 Oct 15 19:27 .. drwx------ 2 mysqldb mysqldb 1024 Oct 15 19:43 filler -rw-rw-r-- 1 root mysqldb 1512 Oct 29 23:56 log-files -rw-rw---- 1 mysqldb mysqldb 13 Oct 29 23:58 update.index -rw-rw---- 1 mysqldb mysqldb 5 Oct 29 23:58 raq804.uk2net.com.pid -rw-rw-r-- 1 mysqldb mysqldb 83 Oct 29 23:58 raq804.uk2net.com.err -rw------- 1 mysqldb mysqldb 0 Oct 29 23:59 update.log drwxr-x--- 6 mysqldb mysqldb 1024 Oct 29 23:59 . -rw-rw---- 1 mysqldb mysqldb 5961241 Oct 29 23:59 update.log.1 [root@raq804 data]# l -rt total 7928 drwxr-x--- 2 mysqldb mysqldb 1024 May 10 11:41 test drwxr-x--- 2 mysqldb mysqldb 1024 Jul 31 01:41 mysql drwxrwxr-x 3 root root 1024 Oct 15 19:27 .. drwx------ 2 mysqldb mysqldb 1024 Oct 15 19:43 filler -rw-rw-r-- 1 root mysqldb 1512 Oct 29 23:56 log-files -rw-rw---- 1 mysqldb mysqldb 13 Oct 29 23:58 update.index -rw-rw---- 1 mysqldb mysqldb 5 Oct 29 23:58 raq804.uk2net.com.pid -rw-rw-r-- 1 mysqldb mysqldb 83 Oct 29 23:58 raq804.uk2net.com.err -rw------- 1 mysqldb mysqldb 0 Oct 29 23:59 update.log drwxr-x--- 6 mysqldb mysqldb 1024 Oct 29 23:59 . -rw-rw---- 1 mysqldb mysqldb 8074121 Oct 29 23:59 update.log.1 There is no error messages in 'raq804.uk2net.com.err' I hope thats enough information required. If you have any questions, pls send me a mail >Fix: I have run the same tests using the standard query log and this works successfully when you specify a filename (i.e. in my.cnf the line: log=query.log). This problem seems to only affect the binary update log. >Submitter-Id: <submitter ID> >Originator: Administrator >Organization: <organization of PR author (multiple lines)> >MySQL support: [none | licence | email support | extended email support ] >Synopsis: <synopsis of the problem (one line)> >Severity: <[ non-critical | serious | critical ] (one line)> >Priority: <[ low | medium | high ] (one line)> >Category: mysql >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)> >Release: mysql-3.23.38 (Official MySQL binary) >Environment: <machine, os, target, libraries (multiple lines)> System: Linux raq804.uk2net.com 2.2.14C10 #3 Wed Jun 21 15:05:10 JST 2000 i586 unknown Architecture: i586 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Compilation info: CC='gcc' CFLAGS='-O3 -mpentium ' CXX='gcc' CXXFLAGS='-O3 -mpentium -felide-constructors' LDFLAGS='-static' LIBC: lrwxrwxrwx 1 root root 13 May 1 2001 /lib/libc.so.6 -> libc-2.1.3.so -rwxr-xr-x 1 root root 4101836 Sep 5 2000 /lib/libc-2.1.3.so -rw-r--r-- 1 root root 20273284 Sep 5 2000 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Sep 5 2000 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --wit h-server-suffix= --enable-assembler --with-mysqld-ldflags=-all-static --with -client-ldflags=-all-static --disable-shared Perl: This is perl, version 5.005_03 built for i386-linux --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php