Bug #35667 please log replication errors in some queryable table
Submitted: 29 Mar 2008 10:37 Modified: 30 Mar 2008 19:30
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version:5.1, 6.0 OS:Any
Assigned to: CPU Architecture:Any

[29 Mar 2008 10:37] Shane Bester
Description:
when a slave sql or i/o thread encounters an error, the errors are visible in the show slave status output.

however, when replication is restarted, the errors will be cleared and the only log kept will be the mysql error log.  there is no easy way to tell when such errors occurred, or at what relay/binlog positions.  parsing the error log is not feasible.

this is a feature request to create a new information_schema.slave_error table containing the entire snapshot of 'show slave status' + timestamp of when an error occurred.

the purpose of this will be to know all the relevant information, exact time and date of the error, and provide some reporting capabilities of replication error occurrences since the server was started.

How to repeat:
setup replication
disconnect the master so slave cannot connect
reconnect master
issue start slave on the slave
try to figure out using your monitoring tool when an error occurred.

Suggested fix:
having all the info in a table will make reporting and monitoring more flexible.
suggest either an information_schema table, or some csv table in the mysql database can be used for this.
[30 Mar 2008 19:30] Valeriy Kravchuk
Thank you for a reasonable feature request.
[7 Aug 2013 5:48] Simon Mudd
Note: The other main issue is that the replication statements (if using SBR) are not recorded in their entirety, which means there is no complete log of the data. Storing this in some external location, like a queryable table makes the information about the skipped/error query complete for later analysis.