From: Tatjana Azundris Nuernberg Date: May 26 2011 11:44am Subject: bzr commit into mysql-trunk branch (tatjana.nuernberg:3106) List-Archive: http://lists.mysql.com/commits/138193 Message-Id: <201105261144.p4QBimO5011290@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///Users/tnurnberg/forest/11745920/56-11745920/ based on revid:tatjana.nuernberg@stripped 3106 Tatjana Azundris Nuernberg 2011-05-26 [merge] manual merge added: mysql-test/suite/binlog/r/binlog_reset_master.result mysql-test/suite/binlog/t/binlog_reset_master.test modified: sql/mysqld.cc === added file 'mysql-test/suite/binlog/r/binlog_reset_master.result' --- a/mysql-test/suite/binlog/r/binlog_reset_master.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/binlog/r/binlog_reset_master.result 2011-05-26 10:50:43 +0000 @@ -0,0 +1 @@ +RESET MASTER; === added file 'mysql-test/suite/binlog/t/binlog_reset_master.test' --- a/mysql-test/suite/binlog/t/binlog_reset_master.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/binlog/t/binlog_reset_master.test 2011-05-26 10:50:43 +0000 @@ -0,0 +1,26 @@ +# ==== Purpose ==== +# +# Test bugs in RESET MASTER. + +--source include/have_debug.inc +--source include/have_log_bin.inc + +####################################################################### +# BUG#12574820: binlog.binlog_tmp_table timing out in daily and weekly trunk run +# Problem: MYSQL_BIN_LOG::reset_logs acquired LOCK_thread_count and +# LOCK_log in the wrong order. This could cause a deadlock when +# RESET MASTER was run concurrently with a disconnecting thread. +####################################################################### + +# We use sleep, not debug_sync, because the sync point needs to be in +# the thread shut down code after the debug sync facility has been +# shut down. +--let $write_var= SET DEBUG="+d,sleep_after_lock_thread_count_before_delete_thd"; CREATE TEMPORARY TABLE test.t1 (a INT); +--let $write_to_file= GENERATE +--disable_query_log +--source include/write_var_to_file.inc +--enable_query_log + +--exec $MYSQL < $write_to_file +RESET MASTER; +--remove_file $write_to_file === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2011-05-25 10:18:08 +0000 +++ b/sql/mysqld.cc 2011-05-26 11:42:14 +0000 @@ -2081,6 +2081,12 @@ void unlink_thd(THD *thd) thd_cleanup(thd); dec_connection_count(); mysql_mutex_lock(&LOCK_thread_count); + /* + Used by binlog_reset_master. It would be cleaner to use + DEBUG_SYNC here, but that's not possible because the THD's debug + sync feature has been shut down at this point. + */ + DBUG_EXECUTE_IF("sleep_after_lock_thread_count_before_delete_thd", sleep(5);); delete_thd(thd); DBUG_VOID_RETURN; } No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).