Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This bug is also seen as a sporadic failure/crash in rpl.rpl_from_mysql80.
When read_log_event() gets an error reading an event, it sets file->error=-1:
/*
|
The SQL slave thread will check if file->error<0 to know
|
if there was an I/O error. Even if there is no "low-level" I/O errors
|
with 'file', any of the high-level above errors is worrying
|
enough to stop the SQL thread now ; as we are skipping the current event,
|
going on with reading and successfully executing other events can
|
only corrupt the slave's databases. So stop.
|
*/
|
file->error= -1;
|
But this is wrong, the file can be the "hot" relaylog that is simultaneously being written by the IO thread, so the file->error flag is shared with that thread. Setting it can cause the IO thread to wrongly detect a write error and disable the relay log. There was then also a missing test for disabled relay log in CHANGE MASTER which could crash on nullptr.
Monty said he would do the review, re-assigning