From: Andrei Elkin Date: June 17 2011 5:56pm Subject: bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3304) WL#5569 List-Archive: http://lists.mysql.com/commits/139432 Message-Id: <201106171756.p5HHuiPq009442@mysql1000.dsl.inet.fi> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1880218692==" --===============1880218692== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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. @ 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. 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 17:56:39 +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 17:56:39 +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 17:56:39 +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 17:56:39 +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 17:56:39 +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 --===============1880218692== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/andrei.elkin@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: andrei.elkin@stripped # target_branch: file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-\ # mr-wl5569/ # testament_sha1: 475e817f1e8fa644ada2f4a56e170e1a5921e8c5 # timestamp: 2011-06-17 20:56:44 +0300 # source_branch: file:///home/andrei/MySQL/BZR/2a-23May/mysql-trunk/ # base_revision_id: andrei.elkin@stripped\ # hk6xi35y36toougb # # Beg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