#At file:///home/lsoares/Workspace/bzr/work/features/b43535/mysql-5.1-rep%2B2/ based on revid:zhenxing.he@stripped
3183 Luis Soares 2010-04-16
BUG#43535: last_io_error in show slave status is confusing
Although IO and SQL thread errors numbers and messages are
reported in SHOW SLAVE STATUS output, the correspondent timestamp
at which they have occurred is not. As such the user may be left
wondering whenever the error happened (NOTE: actually, in the
error log, a timestamp should be printed along with the error
message, however in SHOW SLAVE STATUS it is not currently).
Furthermore, at the time this bug was reported, there was no way
for the user to clean the error number and message reported.
This patch adds two new columns to the output of SHOW SLAVE
STATUS:
- Last_IO_Error_Timestamp - shows the timestamp for the last
error IO error
- Last_SQL_Error_Timestamp - the same as
Last_IO_Error_Timestamp, but for the SQL thread errors.
The timestamp is formatted as : "YYYY-MM-DD HH:MM:SS".
The computation of the timestamp is added as a new method of the
Error class (update_timestamp), which in turn is an inner class
of the Slave_reporting_capability. This new method is called
everytime Slave_reporting_capability::report is invoked with log
level set to ERROR_LEVEL, thence capturing the timestamp of the
error being reported.
Starting from 5.1.37 (ie, when the fix for BUG 44270 was
released), the fields are cleared on RESET SLAVE. Furthermore,
the test case added in this patch checks that: (1) the error
message(s) is not reset on explicit stop slave after an error
occurred; (2) the error message(s) is reset when slave recovers
from the error (ie, when the DBA fixes the problem and resumes
replication by issuing START SLAVE). Moreover, clearing the new
Timestamp fields is done in the Error class clear() method,
therefore when Last_*_Errno and Last_*_Error are reset,
Last_*_Error_Timestamp is gets reset also.
Finally, this patch accommodates the changes needed for existing
MTR server tests:
- result files are updated due to the new _Timestamp columns
- show_slave_status.inc include files are augmented with
replace_regex to mask out the timestamp from result files
- some tests are also changed to mask out the output for the
new _Timestamp columns
@ mysql-test/suite/rpl/t/rpl_show_errors.test
Test case added for the new field in SHOW SLAVE STATUS.
@ sql/rpl_reporting.cc
Deployed call to update_timestamp() method whenever an error
is reported.
@ sql/rpl_reporting.h
Adds timestamp field to the Error class.
Adds cleaning the timestamp field to the clear() method.
Adds update_timestamp method (calculates a timestamp and
sets it to the newly added timestamp field).
@ sql/slave.cc
Adds last_error().timestamp to the output of SHOW SLAVE STATUS.
added:
mysql-test/suite/rpl/r/rpl_show_errors.result
mysql-test/suite/rpl/t/rpl_show_errors.test
modified:
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
mysql-test/include/show_slave_status.inc
mysql-test/include/show_slave_status2.inc
mysql-test/include/test_fieldsize.inc
mysql-test/suite/rpl/r/rpl_000015.result
mysql-test/suite/rpl/r/rpl_bug33931.result
mysql-test/suite/rpl/r/rpl_change_master.result
mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
mysql-test/suite/rpl/r/rpl_flushlog_loop.result
mysql-test/suite/rpl/r/rpl_grant.result
mysql-test/suite/rpl/r/rpl_heartbeat.result
mysql-test/suite/rpl/r/rpl_incident.result
mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
mysql-test/suite/rpl/r/rpl_log_pos.result
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
mysql-test/suite/rpl/r/rpl_replicate_do.result
mysql-test/suite/rpl/r/rpl_rotate_logs.result
mysql-test/suite/rpl/r/rpl_row_colSize.result
mysql-test/suite/rpl/r/rpl_row_log.result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
mysql-test/suite/rpl/r/rpl_row_reset_slave.result
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
mysql-test/suite/rpl/r/rpl_row_until.result
mysql-test/suite/rpl/r/rpl_skip_error.result
mysql-test/suite/rpl/r/rpl_slave_skip.result
mysql-test/suite/rpl/r/rpl_ssl.result
mysql-test/suite/rpl/r/rpl_ssl1.result
mysql-test/suite/rpl/r/rpl_stm_log.result
mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
mysql-test/suite/rpl/r/rpl_stm_until.result
mysql-test/suite/rpl/r/rpl_temporary_errors.result
mysql-test/suite/rpl/t/rpl_bug33931.test
mysql-test/suite/rpl/t/rpl_critical_errors.test
mysql-test/suite/rpl/t/rpl_incident.test
mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
sql/rpl_reporting.cc
sql/rpl_reporting.h
sql/slave.cc
=== modified file 'mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test'
--- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test 2009-02-05 09:49:32 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test 2010-04-16 14:26:31 +0000
@@ -499,7 +499,7 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -556,7 +556,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -699,7 +699,7 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDE
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
#***************************
@@ -765,7 +765,7 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 O
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
STOP SLAVE;
RESET SLAVE;
@@ -842,7 +842,7 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDE
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
STOP SLAVE;
RESET SLAVE;
=== modified file 'mysql-test/extra/rpl_tests/rpl_row_tabledefs.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test 2009-12-17 00:09:52 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test 2010-04-16 14:26:31 +0000
@@ -139,7 +139,7 @@ sync_slave_with_master;
--echo **** On Slave ****
SELECT * FROM t2;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Error> 41 #
--query_vertical SHOW SLAVE STATUS
connection master;
@@ -151,7 +151,7 @@ INSERT INTO t4 VALUES (4);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Error> 41 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -165,7 +165,7 @@ INSERT INTO t5 VALUES (5,10,25);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Error> 41 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -179,7 +179,7 @@ INSERT INTO t6 VALUES (6,12,36);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Error> 41 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -188,7 +188,7 @@ connection master;
INSERT INTO t9 VALUES (6);
sync_slave_with_master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Error> 41 #
--query_vertical SHOW SLAVE STATUS
# Testing some tables extra field that can be null and cannot be null
=== modified file 'mysql-test/include/show_slave_status.inc'
--- a/mysql-test/include/show_slave_status.inc 2007-06-11 20:15:39 +0000
+++ b/mysql-test/include/show_slave_status.inc 2010-04-16 14:26:31 +0000
@@ -3,4 +3,5 @@
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_regex /[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+/####-##-## ##:##:##/
query_vertical SHOW SLAVE STATUS;
=== modified file 'mysql-test/include/show_slave_status2.inc'
--- a/mysql-test/include/show_slave_status2.inc 2008-01-14 07:38:02 +0000
+++ b/mysql-test/include/show_slave_status2.inc 2010-04-16 14:26:31 +0000
@@ -5,4 +5,5 @@
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_regex /[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+/####-##-## ##:##:##/
query_vertical SHOW SLAVE STATUS;
=== modified file 'mysql-test/include/test_fieldsize.inc'
--- a/mysql-test/include/test_fieldsize.inc 2009-09-29 14:10:37 +0000
+++ b/mysql-test/include/test_fieldsize.inc 2010-04-16 14:26:31 +0000
@@ -24,7 +24,7 @@ connection slave;
START SLAVE;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # 42 #
--query_vertical SHOW SLAVE STATUS
# The following should be 0
=== modified file 'mysql-test/suite/rpl/r/rpl_000015.result'
--- a/mysql-test/suite/rpl/r/rpl_000015.result 2009-11-04 12:28:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_000015.result 2010-04-16 14:26:31 +0000
@@ -47,6 +47,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 0
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -89,6 +91,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
=== modified file 'mysql-test/suite/rpl/r/rpl_bug33931.result'
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result 2009-11-28 14:53:48 +0000
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result 2010-04-16 14:26:31 +0000
@@ -44,4 +44,6 @@ Last_SQL_Errno #
Last_SQL_Error Failed during slave thread initialization
Replicate_Ignore_Server_Ids
Master_Server_Id 0
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL debug="";
=== modified file 'mysql-test/suite/rpl/r/rpl_change_master.result'
--- a/mysql-test/suite/rpl/r/rpl_change_master.result 2009-10-02 08:35:03 +0000
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result 2010-04-16 14:26:31 +0000
@@ -52,6 +52,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
change master to master_user='root';
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -94,6 +96,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave;
select * from t1;
n
=== modified file 'mysql-test/suite/rpl/r/rpl_deadlock_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result 2010-04-16 14:26:31 +0000
@@ -91,6 +91,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
*** Test lock wait timeout ***
include/stop_slave.inc
@@ -155,6 +157,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
*** Test lock wait timeout and purged relay logs ***
SET @my_max_relay_log_size= @@global.max_relay_log_size;
@@ -224,6 +228,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
*** Clean up ***
DROP TABLE t1,t2,t3;
=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result 2009-12-17 21:43:35 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result 2010-04-16 14:26:31 +0000
@@ -134,6 +134,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
***** Testing Altering table def scenario *****
@@ -512,6 +514,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
****************************************
* columns in master at middle of table *
@@ -588,6 +592,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -665,6 +671,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -818,6 +826,8 @@ Last_SQL_Errno 1091
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
@@ -906,6 +916,8 @@ Last_SQL_Errno 1054
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
@@ -994,6 +1006,8 @@ Last_SQL_Errno 1072
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result 2009-12-17 21:43:35 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result 2010-04-16 14:26:31 +0000
@@ -134,6 +134,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
***** Testing Altering table def scenario *****
@@ -512,6 +514,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
****************************************
* columns in master at middle of table *
@@ -588,6 +592,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -665,6 +671,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -818,6 +826,8 @@ Last_SQL_Errno 1091
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
@@ -906,6 +916,8 @@ Last_SQL_Errno 1054
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
@@ -994,6 +1006,8 @@ Last_SQL_Errno 1072
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
STOP SLAVE;
RESET SLAVE;
=== modified file 'mysql-test/suite/rpl/r/rpl_flushlog_loop.result'
--- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result 2009-10-01 17:22:44 +0000
+++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result 2010-04-16 14:26:31 +0000
@@ -62,3 +62,5 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
=== modified file 'mysql-test/suite/rpl/r/rpl_grant.result'
--- a/mysql-test/suite/rpl/r/rpl_grant.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_grant.result 2010-04-16 14:26:31 +0000
@@ -82,3 +82,5 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
=== modified file 'mysql-test/suite/rpl/r/rpl_heartbeat.result'
--- a/mysql-test/suite/rpl/r/rpl_heartbeat.result 2009-11-04 12:28:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result 2010-04-16 14:26:31 +0000
@@ -93,6 +93,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
@@ -134,6 +136,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
show status like 'Slave_heartbeat_period';;
Variable_name Slave_heartbeat_period
Value 0.500
=== modified file 'mysql-test/suite/rpl/r/rpl_incident.result'
--- a/mysql-test/suite/rpl/r/rpl_incident.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_incident.result 2010-04-16 14:26:31 +0000
@@ -66,6 +66,8 @@ Last_SQL_Errno 1590
Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -115,4 +117,6 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_known_bugs_detection.result'
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result 2010-04-16 14:26:31 +0000
@@ -52,6 +52,8 @@ Last_SQL_Errno 1105
Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT * FROM t1;
a b
stop slave;
@@ -145,6 +147,8 @@ ON DUPLICATE KEY UPDATE
t1.field_3 = t2.field_c'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT * FROM t1;
id field_1 field_2 field_3
drop table t1, t2;
=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata_fatal.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result 2010-02-12 23:30:44 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result 2010-04-16 14:26:31 +0000
@@ -47,6 +47,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -89,6 +91,8 @@ Last_SQL_Errno 1593
Last_SQL_Error Fatal error: Not enough memory
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp ####-##-## ##:##:##
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result 2009-11-10 18:45:15 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result 2010-04-16 14:26:31 +0000
@@ -51,6 +51,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave;
include/stop_slave.inc
SHOW SLAVE STATUS;
@@ -94,6 +96,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp ####-##-## ##:##:##
+Last_SQL_Error_Timestamp
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
=== modified file 'mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result'
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result 2010-04-16 14:26:31 +0000
@@ -61,6 +61,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
=== modified file 'mysql-test/suite/rpl/r/rpl_replicate_do.result'
--- a/mysql-test/suite/rpl/r/rpl_replicate_do.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result 2010-04-16 14:26:31 +0000
@@ -67,6 +67,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
create table t1 (ts timestamp);
set one_shot time_zone='met';
insert into t1 values('2005-08-12 00:00:00');
=== modified file 'mysql-test/suite/rpl/r/rpl_rotate_logs.result'
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result 2010-04-16 14:26:31 +0000
@@ -55,6 +55,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
select * from t1;
s
Could not break slave
@@ -136,6 +138,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
select * from t2;
m
34
@@ -205,6 +209,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
=== modified file 'mysql-test/suite/rpl/r/rpl_row_colSize.result'
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result 2009-12-17 21:43:35 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result 2010-04-16 14:26:31 +0000
@@ -59,6 +59,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -115,6 +117,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -171,6 +175,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -228,6 +234,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -285,6 +293,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -341,6 +351,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -398,6 +410,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -455,6 +469,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -543,6 +559,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -600,6 +618,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -656,6 +676,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -712,6 +734,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -769,6 +793,8 @@ Last_SQL_Errno 1658
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
=== modified file 'mysql-test/suite/rpl/r/rpl_row_log.result'
--- a/mysql-test/suite/rpl/r/rpl_row_log.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_log.result 2010-04-16 14:26:31 +0000
@@ -288,6 +288,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_log_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result 2010-04-16 14:26:31 +0000
@@ -288,6 +288,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_max_relay_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result 2010-04-16 14:26:31 +0000
@@ -62,6 +62,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 2
#
@@ -112,6 +114,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 3: max_relay_log_size = 0
#
@@ -162,6 +166,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
@@ -209,6 +215,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 5
#
@@ -257,6 +265,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
@@ -303,6 +313,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
=== modified file 'mysql-test/suite/rpl/r/rpl_row_reset_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result 2009-11-04 12:28:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result 2010-04-16 14:26:31 +0000
@@ -45,6 +45,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
change master to master_user='test';
SHOW SLAVE STATUS;
@@ -88,6 +90,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
reset slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -130,6 +134,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
change master to master_user='root';
start slave;
SHOW SLAVE STATUS;
@@ -173,6 +179,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
reset slave;
start slave;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result 2009-12-17 21:43:35 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result 2010-04-16 14:26:31 +0000
@@ -155,10 +155,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
SHOW SLAVE STATUS;
@@ -198,10 +200,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (5);
@@ -243,10 +247,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -288,10 +294,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -332,10 +340,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result 2009-12-17 21:43:35 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result 2010-04-16 14:26:31 +0000
@@ -155,10 +155,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
SHOW SLAVE STATUS;
@@ -198,10 +200,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (5);
@@ -243,10 +247,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -288,10 +294,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1658
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -332,10 +340,12 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Errno <Last_SQL_Error>
+Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp #
+Last_SQL_Error_Timestamp
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_until.result'
--- a/mysql-test/suite/rpl/r/rpl_row_until.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result 2010-04-16 14:26:31 +0000
@@ -61,6 +61,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291;
SELECT * FROM t1;
n
@@ -109,6 +111,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2
SELECT * FROM t2;
n
@@ -155,6 +159,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
START SLAVE;
include/stop_slave.inc
START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2
@@ -199,6 +205,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=561, RELAY_LOG_POS=12;
=== added file 'mysql-test/suite/rpl/r/rpl_show_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_show_errors.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_show_errors.result 2010-04-16 14:26:31 +0000
@@ -0,0 +1,36 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
+DROP TABLE t1;
+DROP TABLE t1;
+# assertion: timestamp should be filled
+include/stop_slave.inc
+# assertion: show that error is preserved after stop slave
+CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
+include/start_slave.inc
+# assertion: show that the error is not reported anymore since replication
+# has resumed correctly
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+RESET MASTER;
+include/stop_slave.inc
+change master to master_port=SLAVE_PORT;
+START SLAVE;
+*** must be having the replicate-same-server-id IO thread error ***
+include/stop_slave.inc
+change master to master_port=MASTER_PORT;
+include/start_slave.inc
=== modified file 'mysql-test/suite/rpl/r/rpl_skip_error.result'
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result 2010-04-16 14:26:31 +0000
@@ -72,6 +72,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
==== Clean Up ====
drop table t1;
create table t1(a int primary key);
@@ -127,6 +129,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
==== Clean Up ====
drop table t1;
==== Using Innodb ====
=== modified file 'mysql-test/suite/rpl/r/rpl_slave_skip.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result 2010-01-15 17:52:46 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result 2010-04-16 14:26:31 +0000
@@ -84,6 +84,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -152,6 +154,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
**** On Master ****
DROP TABLE t1, t2;
SET SESSION BINLOG_FORMAT=ROW;
=== modified file 'mysql-test/suite/rpl/r/rpl_ssl.result'
--- a/mysql-test/suite/rpl/r/rpl_ssl.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ssl.result 2010-04-16 14:26:31 +0000
@@ -60,6 +60,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
STOP SLAVE;
select * from t1;
t
@@ -106,6 +108,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
drop user replssl@localhost;
drop table t1;
End of 5.0 tests
=== modified file 'mysql-test/suite/rpl/r/rpl_ssl1.result'
--- a/mysql-test/suite/rpl/r/rpl_ssl1.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ssl1.result 2010-04-16 14:26:31 +0000
@@ -59,6 +59,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
change master to master_user='root',master_password='', master_ssl=0;
start slave;
@@ -105,6 +107,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
change master to
master_host="localhost",
@@ -161,4 +165,6 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
drop table t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_log.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_log.result 2010-02-12 23:30:44 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_log.result 2010-04-16 14:26:31 +0000
@@ -286,6 +286,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result 2010-04-16 14:26:31 +0000
@@ -62,6 +62,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 2
#
@@ -112,6 +114,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 3: max_relay_log_size = 0
#
@@ -162,6 +166,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
@@ -209,6 +215,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 5
#
@@ -257,6 +265,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
@@ -303,6 +313,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_reset_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result 2009-11-04 12:28:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result 2010-04-16 14:26:31 +0000
@@ -45,6 +45,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
change master to master_user='test';
SHOW SLAVE STATUS;
@@ -88,6 +90,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
reset slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -130,6 +134,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
change master to master_user='root';
start slave;
SHOW SLAVE STATUS;
@@ -173,6 +179,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
stop slave;
reset slave;
start slave;
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_until.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result 2010-02-12 23:30:44 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result 2010-04-16 14:26:31 +0000
@@ -65,6 +65,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
@@ -113,6 +115,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=891;
select * from t2;
n
@@ -159,6 +163,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
start slave;
[on master]
[on slave]
@@ -205,6 +211,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
==== Test various error conditions ====
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
=== modified file 'mysql-test/suite/rpl/r/rpl_temporary_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result 2009-10-18 03:57:38 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result 2010-04-16 14:26:31 +0000
@@ -80,6 +80,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
DROP TABLE t1;
**** On Master ****
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/t/rpl_bug33931.test'
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test 2009-11-27 23:34:47 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test 2010-04-16 14:26:31 +0000
@@ -40,7 +40,7 @@ connection slave;
source include/wait_for_slave_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 19 # 23 # 33 # 37 #
+--replace_column 1 # 8 # 9 # 19 # 23 # 33 # 37 # 42 #
query_vertical show slave status;
#
=== modified file 'mysql-test/suite/rpl/t/rpl_critical_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_critical_errors.test 2007-12-06 15:27:10 +0000
+++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test 2010-04-16 14:26:31 +0000
@@ -61,7 +61,7 @@ SELECT COUNT(*) FROM t2;
# ... and there the error code should be 1317 (ER_QUERY_INTERRUPTED)
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 20 # 22 # 23 # 33 #
+--replace_column 1 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 42 #
query_vertical SHOW SLAVE STATUS;
enable_parsing;
=== modified file 'mysql-test/suite/rpl/t/rpl_incident.test'
--- a/mysql-test/suite/rpl/t/rpl_incident.test 2009-05-02 19:28:54 +0000
+++ b/mysql-test/suite/rpl/t/rpl_incident.test 2010-04-16 14:26:31 +0000
@@ -24,7 +24,7 @@ source include/wait_for_slave_sql_error.
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # 42 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
=== modified file 'mysql-test/suite/rpl/t/rpl_known_bugs_detection.test'
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test 2009-11-27 23:34:47 +0000
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test 2010-04-16 14:26:31 +0000
@@ -27,7 +27,7 @@ SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # 42 #
--query_vertical show slave status;
# show that it was not replicated
SELECT * FROM t1;
@@ -83,7 +83,7 @@ SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # 42 #
--query_vertical show slave status;
# show that it was not replicated
SELECT * FROM t1;
=== added file 'mysql-test/suite/rpl/t/rpl_show_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_show_errors.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_show_errors.test 2010-04-16 14:26:31 +0000
@@ -0,0 +1,119 @@
+-- source include/master-slave.inc
+
+# There is no point in running this test in more
+# than once, ie, one for each binary log format.
+-- source include/have_binlog_format_row.inc
+
+#
+# BUG#43535: last_io_error in show slave status is confusing
+#
+
+############# CHECKS SQL ERRORS #############
+-- source include/master-slave-reset.inc
+-- connection master
+CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
+-- sync_slave_with_master
+# action: remove table on the slave to force SQL error
+DROP TABLE t1;
+
+-- connection master
+# action: drop the table on the master
+DROP TABLE t1;
+
+-- connection slave
+# action: now wait for the slave to stop because it cannot
+# remove a table that does not exist
+-- source include/wait_for_slave_sql_to_stop.inc
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error_Timestamp, 1)
+
+-- echo # assertion: timestamp should be filled
+if (`SELECT '$error_ts' = '' OR '$errno' = 0`)
+{
+ -- error UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
+# action: stop the slave (this should preserve the error)
+-- source include/stop_slave.inc
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error_Timestamp, 1)
+
+-- echo # assertion: show that error is preserved after stop slave
+if (`SELECT '$error_ts' = '' OR '$errno' = 0`)
+{
+ -- error UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
+-- connection slave
+# action: create the table again on the slave so that it resumes replication
+# correctly when we restart the slave
+CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
+-- source include/start_slave.inc
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error_Timestamp, 1)
+
+-- echo # assertion: show that the error is not reported anymore since replication
+-- echo # has resumed correctly
+if (`SELECT '$error_ts' <> '' OR $errno <> 0`)
+{
+ -- echo UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
+############# CHECKS IO ERRORS #############
+
+-- connection master
+-- source include/master-slave-reset.inc
+
+# mostly copied and extended from rpl_server_id1.test
+-- connection slave
+RESET MASTER;
+
+# replicate ourselves
+-- source include/stop_slave.inc
+-- replace_result $SLAVE_MYPORT SLAVE_PORT
+-- eval change master to master_port=$SLAVE_MYPORT
+START SLAVE;
+
+-- let $slave_param= Last_IO_Errno
+-- let $slave_param_value= 1593
+-- source include/wait_for_slave_param.inc
+-- echo *** must be having the replicate-same-server-id IO thread error ***
+
+# assertion: assert that error has been reported as well as a timestamp
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_IO_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_IO_Error_Timestamp, 1)
+if (`SELECT '$error_ts' = '' OR '$errno' = 0`)
+{
+ -- error UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
+# action: stop the slave
+-- source include/stop_slave.inc
+
+# assertion: show that error is still reported
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_IO_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_IO_Error_Timestamp, 1)
+if (`SELECT '$error_ts' = '' OR '$errno' = 0`)
+{
+ -- error UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
+# action: restore correct settings
+-- replace_result $MASTER_MYPORT MASTER_PORT
+-- eval change master to master_port=$MASTER_MYPORT
+-- source include/start_slave.inc
+
+# assertion: show that no error is reported anymore
+-- let $errno= query_get_value("SHOW SLAVE STATUS", Last_IO_Errno, 1)
+-- let $error_ts= query_get_value("SHOW SLAVE STATUS", Last_IO_Error_Timestamp, 1)
+if (`SELECT '$error_ts' <> '' OR '$errno' <> 0`)
+{
+ -- echo UNEXPECTED ERROR VALUES IN SHOW SLAVE STATUS FIELDS: Errno: $errno, Error_Timestamp: $error_ts
+ -- die
+}
+
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result 2010-04-16 14:26:31 +0000
@@ -181,6 +181,8 @@ Last_SQL_Errno <Last_SQL_Errno>
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp <Last_IO_Error_Timestamp>
+Last_SQL_Error_Timestamp <Last_SQL_Error_Timestamp>
set GLOBAL slave_transaction_retries=10;
include/start_slave.inc
select * from t1 order by nid;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result 2010-04-16 14:26:31 +0000
@@ -58,6 +58,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SELECT * FROM t1 ORDER BY a;
a b
1 2
@@ -103,5 +105,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
STOP SLAVE;
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result 2009-11-10 18:45:15 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result 2010-04-16 14:26:31 +0000
@@ -55,6 +55,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SELECT * FROM t1 ORDER BY a;
a b
1 2
@@ -106,4 +108,6 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result 2010-04-16 14:26:31 +0000
@@ -33,15 +33,15 @@ c1 c2 c3
row3 C 3
row4 D 4
SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Last_IO_Error_Timestamp Last_SQL_Error_Timestamp
+<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1 <Last_IO_Error_Timestamp> <Last_SQL_Error_Timestamp>
STOP SLAVE;
CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Last_IO_Error_Timestamp Last_SQL_Error_Timestamp
+<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1 <Last_IO_Error_Timestamp> <Last_SQL_Error_Timestamp>
START SLAVE;
SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
@@ -68,6 +68,6 @@ SELECT * FROM t1;
c1 c2 c3
row2 new on slave 2
SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> <Last_IO_Errno> <Last_IO_Error> 0 1
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Last_IO_Error_Timestamp Last_SQL_Error_Timestamp
+<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1 <Last_IO_Error_Timestamp> <Last_SQL_Error_Timestamp>
DROP TABLE IF EXISTS t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result 2009-11-03 19:02:56 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result 2010-04-16 14:26:31 +0000
@@ -304,6 +304,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result 2009-10-01 16:44:53 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result 2010-04-16 14:26:31 +0000
@@ -109,6 +109,8 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Last_IO_Error_Timestamp
+Last_SQL_Error_Timestamp
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
hex(c1) hex(c2) c3
1 1 row1
=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test 2009-07-14 19:31:19 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test 2010-04-16 14:26:31 +0000
@@ -196,7 +196,7 @@ source include/wait_for_slave_sql_to_sto
# Replication should have stopped, since max retries were not enough.
# verify with show slave status
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error> 41 <Last_IO_Error_Timestamp> 42 <Last_SQL_Error_Timestamp>
--query_vertical SHOW SLAVE STATUS;
# now set max retries high enough to succeed, and start slave again
=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test 2007-07-25 13:40:43 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test 2010-04-16 14:26:31 +0000
@@ -43,7 +43,7 @@ SELECT * FROM t1 ORDER BY c3;
SELECT * FROM t1 ORDER BY c3;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Last_IO_Error_Timestamp> 42 <Last_SQL_Error_Timestamp>
SHOW SLAVE STATUS;
# stop slave and reset position to before the last changes
@@ -54,7 +54,7 @@ eval CHANGE MASTER TO
master_log_pos = $the_pos ;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Last_IO_Error_Timestamp> 42 <Last_SQL_Error_Timestamp>
SHOW SLAVE STATUS;
# start the slave again
@@ -107,7 +107,7 @@ COMMIT;
--connection slave
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Last_IO_Error_Timestamp> 42 <Last_SQL_Error_Timestamp>
SHOW SLAVE STATUS;
connection master;
=== modified file 'sql/rpl_reporting.cc'
--- a/sql/rpl_reporting.cc 2009-06-16 15:04:30 +0000
+++ b/sql/rpl_reporting.cc 2010-04-16 14:26:31 +0000
@@ -24,6 +24,7 @@ Slave_reporting_capability::report(logle
pbuff= m_last_error.message;
pbuffsize= sizeof(m_last_error.message);
m_last_error.number = err_code;
+ m_last_error.update_timestamp();
report_function= sql_print_error;
break;
case WARNING_LEVEL:
=== modified file 'sql/rpl_reporting.h'
--- a/sql/rpl_reporting.h 2009-06-16 15:04:30 +0000
+++ b/sql/rpl_reporting.h 2010-04-16 14:26:31 +0000
@@ -67,12 +67,36 @@ public:
{
number= 0;
message[0]= '\0';
+ timestamp[0]= '\0';
+
+ }
+
+ void update_timestamp()
+ {
+ time_t skr;
+ struct tm tm_tmp;
+ struct tm *start;
+
+ skr= my_time(0);
+ localtime_r(&skr, &tm_tmp);
+ start=&tm_tmp;
+
+ my_sprintf(timestamp, (timestamp, "%04d-%02d-%02d %2d:%02d:%02d",
+ start->tm_year + 1900,
+ start->tm_mon+1,
+ start->tm_mday,
+ start->tm_hour,
+ start->tm_min,
+ start->tm_sec));
+ timestamp[19]= '\0';
}
/** Error code */
uint32 number;
/** Error message */
char message[MAX_SLAVE_ERRMSG];
+ /** Error timestamp as string */
+ char timestamp[20];
};
Error const& last_error() const { return m_last_error; }
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2010-02-12 23:30:44 +0000
+++ b/sql/slave.cc 2010-04-16 14:26:31 +0000
@@ -1723,6 +1723,8 @@ bool show_master_info(THD* thd, Master_i
FN_REFLEN));
field_list.push_back(new Item_return_int("Master_Server_Id", sizeof(ulong),
MYSQL_TYPE_LONG));
+ field_list.push_back(new Item_empty_string("Last_IO_Error_Timestamp", 20));
+ field_list.push_back(new Item_empty_string("Last_SQL_Error_Timestamp", 20));
if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
@@ -1871,6 +1873,10 @@ bool show_master_info(THD* thd, Master_i
}
// Master_Server_id
protocol->store((uint32) mi->master_id);
+ // Last_IO_Error_Timestamp
+ protocol->store(mi->last_error().timestamp, &my_charset_bin);
+ // Last_SQL_Error_Timestamp
+ protocol->store(mi->rli.last_error().timestamp, &my_charset_bin);
pthread_mutex_unlock(&mi->rli.err_lock);
pthread_mutex_unlock(&mi->err_lock);
Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20100416142631-06n0rpe0pftpff1q.bundle