In 3.23.x versions of MySQL the actual binary log file sizes stayed
fairly consistent. An 'empty' log file for instance on 3.23.53a is 73
bytes. I have a situation where I'm doing a roll-your-own replication
from many sites to one central server where the remote sites are on
everything from dialup to dedicated T-1's. I can't easily use the 'real'
replication and have written some PERL scripts to check every few
minutes to see if there is data in a binary replication log file and
'mysqlbinlog' dump out that data, send it up to the web server, and
flush that log file. Very consistent and reliable on 3.23.x but I've
started using 4.0.4 at a few places and the binary log file sizes aren't
consistent. I'm wondering if that is incidental to something or
intentional or something I'll never again be able to count on or what? 

Example:

-rw-rw----    1 mysql    mysql          46 Nov 27 06:00 srv-bin.036
-rw-rw----    1 mysql    mysql          46 Nov 27 06:30 srv-bin.037
-rw-rw----    1 mysql    mysql          46 Nov 27 07:00 srv-bin.038
-rw-rw----    1 mysql    mysql          46 Nov 27 07:30 srv-bin.039
-rw-rw----    1 mysql    mysql          46 Nov 27 08:00 srv-bin.040
-rw-rw----    1 mysql    mysql        6233 Nov 27 08:30 srv-bin.041
-rw-rw----    1 mysql    mysql          46 Nov 27 09:00 srv-bin.042
-rw-rw----    1 mysql    mysql        9502 Nov 27 09:30 srv-bin.043
-rw-rw----    1 mysql    mysql        4939 Nov 27 09:35 srv-bin.044
-rw-rw----    1 mysql    mysql        1426 Nov 27 09:30 srv-bin.index

The srv-bin.index file contains a list of all the binary log files in
sequence. I just 'tail' off the bottom line which points to srv-bin.044
which I then check the file size of. If in this case it's 46 bytes I'll
assume it's empty and contains no new inserts, updates or deletes. On a
different server this size though is 45 and after doing a "flush master"
the file is 79 bytes and at other times it appears to be 4 bytes.

Instead of checking file size, is there some other easy mechanism of
checking a server to see if there is anything currently logged in the
binary log waiting to be replicated?

Thanks!



---------------------------------------------------------------------
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

Reply via email to