Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.11
-
None
-
Can result in unexpected behaviour
Description
relay_log_pos has its validity checked at CHANGE MASTER time rather than when opening the relay log.
This means, although CHANGE MASTER cannot set relay_log_pos to a nonëxistent (past-EOF) file position, it can still become nonëxistent outside of CHANGE MASTER if:
- The relay log is manually truncated (that is, without using a Server feature like RESET SLAVE), or
- The slave is restarted to load a manually-edited relay-log.info (relay_log_pos is the 3rd line).
The SQL Thread will silently (attempt to) seek to the past-EOF location of the file.
On my Ubuntu 25.10 (so probably all Linux), the seek is clamped to EOF, and the SQL thread continues with no further issues.
But on a Windows debug CI, it failed the assertion my_b_tell(cur_log) == event_relay_log_pos.
By editing the relay-log.info, relay_log_pos can also be set to a number < 4.
This will fail the assertion event_relay_log_pos >= 4 on a debug build.
Note that reloading of CHANGE MASTER options from master/relay_log.info without constraint verification is usually fine, as other invalid options naturally become runtime errors; e.g. for master_log_pos:
Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at 1048576, the last event read from 'master-bin.000001' at 4, the last byte read from 'master-bin.000001' at 4.'
Attachments
Issue Links
- split from
-
MDEV-38020 Master & Relay Log info files read 2^31 and above incorrectly
-
- Closed
-