Bug #58584 Move timestamps in Slave_[SQL|IO]_Error to separate columns
Submitted: 30 Nov 2010 7:59 Modified: 10 Mar 2011 16:50
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:trunk OS:Any
Assigned to: Luis Soares CPU Architecture:Any
Tags: show slave status, slave_io_error_timestamp, slave_sql_error_timestamp
Triage: Triaged: D5 (Feature request)

[30 Nov 2010 7:59] Sven Sandberg
Description:
In BUG#43535, we added timestamps to the output of SHOW SLAVE STATUS in the Slave_SQL_Error and Slave_IO_Error. The timestamps were added as a prefix of the error message columns, in string form.

It is great that we have timestamps in SHOW SLAVE STATUS, this is obviously very useful. However, it would be better to separate out the timestamps in new columns, and provide each separate piece of data to the user. Then it's up to the user to concatenate them if they want to. Changing the format of the error message is also a small compatibility problem, in case some user parses the output.

The replication team decided to fix this and separate the information in two columns. The server where timestamp and error message are concatenated in one column has not yet been released, so if we fix this soon there is no compatibility problem and no user-visible regression.

How to repeat:
--source include/master-slave.inc
CREATE TABLE t1 (a INT PRIMARY KEY);
--sync_slave_with_master
INSERT INTO t1 VALUES (1);
--connection master
INSERT INTO t1 VALUES (1);
--connection slave
--sleep 2
query_vertical SHOW SLAVE STATUS;

The output contains:

...
Last_SQL_Error	101130 10:55:47 Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)'
...
[4 Feb 2011 14:11] Luis Soares
This can be implemented by taking one of first proposed patches for
BUG#43535. 

The initial approach was indeed to have a separate column for each 
timestamp. For instance, one can take part of the changes proposed 
in (in particular the changes for sql/slave.cc):

  - http://lists.mysql.com/commits/105892
[4 Feb 2011 14:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/130420

3595 Luis Soares	2011-02-04
      BUG#58584: Move timestamps in Slave_[SQL|IO]_Error to separate
                 columns
      
      In BUG 43535, we added timestamps to errors in reported in SHOW
      SLAVE STATUS. However, it was decided that the timestamp should
      not be embedded in the error message and, instead, moved it into
      its own field in SHOW SLAVE STATUS output. This is exactly what
      this patch fixes.
[4 Feb 2011 14:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/130421

3595 Luis Soares	2011-02-04
      BUG#58584: Move timestamps in Slave_[SQL|IO]_Error to separate
                 columns
      
      In BUG 43535, we added timestamps to errors in reported in SHOW
      SLAVE STATUS. However, it was decided that the timestamp should
      not be embedded in the error message and, instead, moved it into
      its own field in SHOW SLAVE STATUS output. This is exactly what
      this patch fixes.
[4 Feb 2011 15:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/130451

3595 Luis Soares	2011-02-04
      BUG#58584: Move timestamps in Slave_[SQL|IO]_Error to separate
                 columns
      
      In BUG 43535, we added timestamps to errors in reported in SHOW
      SLAVE STATUS. However, it was decided that the timestamp should
      not be embedded in the error message and, instead, moved it into
      its own field in SHOW SLAVE STATUS output. This is exactly what
      this patch fixes.
[7 Feb 2011 15:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/130599

3595 Luis Soares	2011-02-07
      BUG#58584: Move timestamps in Slave_[SQL|IO]_Error to separate
                 columns
      
      In BUG 43535, we added timestamps to errors in reported in SHOW
      SLAVE STATUS. However, it was decided that the timestamp should
      not be embedded in the error message and, instead, moved it into
      its own field in SHOW SLAVE STATUS output. This is exactly what
      this patch fixes.
[10 Mar 2011 16:50] Jon Stephens
Documented in the 5.6.3 changelog as follows:

        MySQL 5.6.1 added timestamps to the error messages shown in the 
        Last_IO_Error and Last_SQL_Error columns of the output of SHOW SLAVE
        STATUS. Now these timestamps are shown in separate columns of
        their own, named Last_IO_Error_Timestamp and
        Last_IO_Error_Timestamp, respectively.

Closed.