#At file:///home/lsoares/Workspace/bzr/work/bugfixing/44209/mysql-next-mr-rpl-merge/ based on revid:alfranio.correia@stripped
3012 Luis Soares 2010-07-30
BUG#43535: last_io_error in show slave status is confusing
Post-push fix.
Small improvement on the test case to make it more robust,
ie, tolerate races between session thread and IO/SQL threads
while cleaning up the error message after a slave restart.
modified:
mysql-test/suite/rpl/r/rpl_show_errors.result
mysql-test/suite/rpl/t/rpl_show_errors.test
=== modified file 'mysql-test/suite/rpl/r/rpl_show_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_show_errors.result 2010-04-21 17:22:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_show_errors.result 2010-07-30 15:44:12 +0000
@@ -17,6 +17,7 @@ DROP TABLE t1;
include/stop_slave.inc
# assertion: show that error is preserved after stop slave as well as the timestamp
CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
+Last_SQL_Errno: 1051
include/start_slave.inc
# assertion: show that the error is not reported anymore since replication
# has resumed correctly
@@ -35,5 +36,6 @@ START SLAVE;
include/stop_slave.inc
# assertion: show that error is preserved after stop slave as well as the timestamp
change master to master_port=MASTER_PORT;
+Last_IO_Errno: 1593
include/start_slave.inc
# assertion: show that no error is reported anymore
=== modified file 'mysql-test/suite/rpl/t/rpl_show_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_show_errors.test 2010-04-21 17:22:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_show_errors.test 2010-07-30 15:44:12 +0000
@@ -49,17 +49,18 @@ if (`SELECT (STRCMP("$errmsg0", "$errmsg
# 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)));
+-- let $sql_errno= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1)
+-- echo Last_SQL_Errno: $sql_errno
-- source include/start_slave.inc
-- echo # assertion: show that the error is not reported anymore since replication
-- echo # has resumed correctly
--- let $errmsg2= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1)
-if (`SELECT STRCMP("$errmsg2", "")`)
-{
- -- let $errts2= `SELECT SUBSTRING("$errmsg2" FROM 1 FOR 15)`
- -- echo timestamp { got: "$errts2", expected: "" }, message { got: "$errmsg2", expected: "" }
- -- die
-}
+let $slave_param= Last_SQL_Errno;
+let $slave_param_comparison= =;
+let $slave_param_value= 0;
+let $slave_error_message= Failed while waiting for slave to clear the SQL error after starting;
+source include/wait_for_slave_param.inc;
+
############# CHECKS IO ERRORS #############
@@ -105,14 +106,14 @@ if (`SELECT (STRCMP("$errmsg0", "$errmsg
# action: restore correct settings
-- replace_result $MASTER_MYPORT MASTER_PORT
-- eval change master to master_port=$MASTER_MYPORT
+-- let $io_errno= query_get_value("SHOW SLAVE STATUS", Last_IO_Errno, 1)
+-- echo Last_IO_Errno: $io_errno
-- source include/start_slave.inc
-- echo # assertion: show that no error is reported anymore
--- let $errmsg2= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
-if (`SELECT STRCMP("$errmsg2", "")`)
-{
- -- let $errts2= `SELECT SUBSTRING("$errmsg2" FROM 1 FOR 15)`
- -- echo timestamp { got: "$errts2", expected:"" }, message { got: "$errmsg2", expected: "" }
- -- die
-}
+let $slave_param= Last_IO_Errno;
+let $slave_param_comparison= =;
+let $slave_param_value= 0;
+let $slave_error_message= Failed while waiting for slave to clear the IO error after starting;
+source include/wait_for_slave_param.inc;
Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20100730154412-dpr9xez6vf2p31pi.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-rpl-merge branch (luis.soares:3012)Bug#43535 | Luis Soares | 30 Jul |