From: Andrei Elkin Date: April 19 2012 4:31pm Subject: bzr push into mysql-trunk branch (andrei.elkin:3890 to 3891) Bug#13893310 List-Archive: http://lists.mysql.com/commits/143496 X-Bug: 13893310 Message-Id: <201204191631.q3JGVNLm021522@mysql1000.dsl.inet.fi> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3891 Andrei Elkin 2012-04-19 BUG#13893310 fixing two post-push issues: 1. Valgrind report ==26329== by 0xA3AE2E: my_malloc (my_malloc.c:38) ==26329== by 0xA1A881: init_io_cache (mf_iocache.c:232) ==26329== by 0xA0D883: Rpl_info_file::do_init_info(unsigned long const*, unsigned int) (rpl_info_file.cc:95) ==26329== by 0x9FC69D: Rpl_info_handler::init_info(unsigned long const*, unsigned int) (rpl_info_handler.h:45) ==26329== by 0x9FBE37: Master_info::init_info() (rpl_mi.cc:303) ==26329== by 0x9F6278: init_info(Master_info*, bool, int) (rpl_slave.cc:459) ==26329== by 0x9F96F9: init_slave() (rpl_slave.cc:316) 2. A race condition in rpl_parallel_change_master indicated with mysqltest: At line 86: query 'CHANGE MASTER TO RELAY_LOG_FILE='$relay_file', RELAY_LOG_POS=$relay_pos' succeeded - should have failed with errno 1801. @ mysql-test/suite/rpl/t/rpl_parallel_change_master.test make sure workers doing d2.t1 raced the one that occupied with d1.t1 so that on slow environment as well slave stops having gaps. @ sql/rpl_mi.cc Implementing a deferred cleanup in lack of which expect the valgrind to catch: ==26329== by 0xA3AE2E: my_malloc (my_malloc.c:38) ==26329== by 0xA1A881: init_io_cache (mf_iocache.c:232) ==26329== by 0xA0D883: Rpl_info_file::do_init_info ****** Implementing a deferred cleanup in lack of which expect the valgrind to catch: ==26329== by 0xA3AE2E: my_malloc (my_malloc.c:38) ==26329== by 0xA1A881: init_io_cache (mf_iocache.c:232) ==26329== by 0xA0D883: Rpl_info_file::do_init_info modified: mysql-test/suite/rpl/t/rpl_parallel_change_master.test sql/rpl_mi.cc 3890 Alexander Barkov 2012-04-19 Additional fix for the previous commit changing data type for m_lenth in SimpleCString from uint to size_t. modified: sql/item.h === modified file 'mysql-test/suite/rpl/t/rpl_parallel_change_master.test' --- a/mysql-test/suite/rpl/t/rpl_parallel_change_master.test 2012-03-28 15:24:17 +0000 +++ b/mysql-test/suite/rpl/t/rpl_parallel_change_master.test 2012-04-19 16:30:09 +0000 @@ -68,11 +68,18 @@ INSERT INTO d1.t1 VALUES (13); # to caus INSERT INTO d1.t1 VALUES (6); INSERT INTO d2.t1 VALUES (7); INSERT INTO d1.t1 VALUES (13); -INSERT INTO d2.t1 VALUES (8); +INSERT INTO d2.t1 VALUES (8); # this worker will race over one inserting (13) INSERT INTO d2.t1 VALUES (9); --connection slave -COMMIT; # worker executing (13) errors out +# make sure workers doing d2.t1 raced the one that occupied with d1.t1 +--let $count= 1 +--let $table= d2.t1 +--let $wait_condition= select count(*) = 1 from $table where a = 8 +--source include/wait_condition.inc + +# make worker executing (13) to error out +COMMIT; --let $slave_sql_errno= 1062 --source include/wait_for_slave_sql_error.inc === modified file 'sql/rpl_mi.cc' --- a/sql/rpl_mi.cc 2012-04-18 13:06:39 +0000 +++ b/sql/rpl_mi.cc 2012-04-19 16:30:09 +0000 @@ -317,7 +317,7 @@ int Master_info::init_info() DBUG_RETURN(0); err: - // todo: handler->end_info(uidx, nidx); + handler->end_info(uidx, nidx); inited= 0; sql_print_error("Error reading master configuration."); DBUG_RETURN(1); No bundle (reason: useless for push emails).