#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl5569/ based on revid:andrei.elkin@stripped
3304 Andrei Elkin 2011-06-17
wl#5569 MTS
fixing tests and a segfault at the end of handle_slave_sql() happened after worker initialization
failed (e.g rpl_row_log on win).
@ mysql-test/extra/rpl_tests/rpl_loaddata.test
MTS-suppression is added.
@ mysql-test/suite/rpl/r/rpl_loaddata.result
MTS-suppression is added.
@ mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
MTS-suppression is added.
@ mysql-test/suite/sys_vars/t/disabled.def
constant nuisanse is disabled in the feature tree.
Todo: do not merge it when pushing to the main tree.
@ sql/rpl_slave.cc
Moved workers initialization after one of the coordinator so that
failure in the former routine is handled with a proper state of coordinator.
This fix eliminates segfault at the end of handle_slave_sql() for few tests but does not address the reason
of worker initialization failure, like in rpl_row_log on win:
110616 7:37:57 [Note] Info file G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0 cannot be accessed (errno 13). Most likely this is a new slave or you are changing the repository type.
110616 7:37:57 [ERROR] G:/pb2/test/sb_1-3486364-1308189142.46/mysql-5.6.3-m5-win-x86_64-test/sql/Debug/mysqld.exe: File 'G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0' not found (Errcode: 13)
110616 7:37:57 [ERROR] Failed to create a new info file (file 'G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0', errno 13)
110616 7:37:57 [ERROR] Error reading slave worker configuration
110616 7:37:57 [ERROR] Failed during slave worker thread create
110616 7:37:57 [ERROR] Slave SQL: Failed during slave workers initialization, Error_code: 1593
modified:
mysql-test/extra/rpl_tests/rpl_loaddata.test
mysql-test/suite/rpl/r/rpl_loaddata.result
mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
mysql-test/suite/sys_vars/t/disabled.def
sql/rpl_slave.cc
=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test 2011-02-23 20:01:27 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test 2011-06-17 18:01:58 +0000
@@ -71,6 +71,7 @@ connection slave;
# 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
--let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error_and_skip.inc
=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result 2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result 2011-06-17 18:01:58 +0000
@@ -29,6 +29,7 @@ insert into t1 values(1,10);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc
set sql_log_bin=0;
=== modified file 'mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result 2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result 2011-06-17 18:01:58 +0000
@@ -45,6 +45,7 @@ insert into t1 values(1,10);
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc
set sql_log_bin=0;
=== modified file 'mysql-test/suite/sys_vars/t/disabled.def'
--- a/mysql-test/suite/sys_vars/t/disabled.def 2011-05-23 11:33:41 +0000
+++ b/mysql-test/suite/sys_vars/t/disabled.def 2011-06-17 18:01:58 +0000
@@ -15,3 +15,4 @@ transaction_prealloc_size_basic_32 : Bu
transaction_prealloc_size_basic_64 : Bug#11748572
#thread_cache_size_func : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
+all_vars : bug#12664445 Fri Jun 17 20:40:24 EEST 2011 andrei
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc 2011-06-17 10:51:59 +0000
+++ b/sql/rpl_slave.cc 2011-06-17 18:01:58 +0000
@@ -4406,14 +4406,6 @@ pthread_handler_t handle_slave_sql(void
pthread_detach_this_thread();
- /* MTS: starting the worker pool */
- if (slave_start_workers(rli, rli->opt_slave_parallel_workers) != 0)
- {
- mysql_mutex_unlock(&rli->run_lock);
- rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
- "Failed during slave workers initialization");
- goto err;
- }
if (init_slave_thread(thd, SLAVE_THD_SQL))
{
/*
@@ -4432,6 +4424,16 @@ pthread_handler_t handle_slave_sql(void
mysql_mutex_lock(&LOCK_thread_count);
threads.append(thd);
mysql_mutex_unlock(&LOCK_thread_count);
+
+ /* MTS: starting the worker pool */
+ if (slave_start_workers(rli, rli->opt_slave_parallel_workers) != 0)
+ {
+ mysql_cond_broadcast(&rli->start_cond);
+ mysql_mutex_unlock(&rli->run_lock);
+ rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+ "Failed during slave workers initialization");
+ goto err;
+ }
/*
We are going to set slave_running to 1. Assuming slave I/O thread is
alive and connected, this is going to make Seconds_Behind_Master be 0
Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110617180158-1fjn4xd2ngc4zq5a.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3304) WL#5569 | Andrei Elkin | 19 Jun |