#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
Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110617175639-f5u6gpt7r8h73k6r.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3304) WL#5569 | Andrei Elkin | 19 Jun |