Simon J Mudd 087e2df5a4 Make MaxScale handle zero-length files to aid bootstrapping.
When bootstrapping a binlog router to start it needs to know the first
file to use. You can provide this information in the config file but
that will never be up to date, or you can copy a file to the binlog
server and start maxscale. It will then carry on from the last file’s
current position.

The binlog files have a 4-byte magic prefix so to start from the beginning
(position 4) you need to add these to an empty file if you do this by
hand. If you don’t then maxscale will attempt to download from the
master at position 0 and the master will not accept this value. (This is
not apparent with a mysql client as change master to … master_log_pos
= 0 triggers a write of the 4 magic bytes and then asks the master for
information from position 4 [not 0]).

This patch makes MaxScale behave similarly and allows you to only
need to touch the first binlog file to be downloaded for it to do the
right thing.
2015-04-23 20:26:56 +02:00
..
2015-01-14 19:08:24 +02:00