From: Date: March 31 2006 11:48am Subject: bk commit into 5.0 tree (lars:1.2117) BUG#18116 List-Archive: http://lists.mysql.com/commits/4360 X-Bug: 18116 Message-Id: <200603310948.k2V9mRZx010886@dl145h.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of lthalmann. When lthalmann does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2117 06/03/31 11:48:08 lars@stripped +1 -0 BUG#18116: Changed of how mutex is handled for XA and rotating binlog sql/log.cc 1.188 06/03/31 11:47:59 lars@stripped +5 -1 thread_safe_increment is done as an atomic operation on some platforms and that does not respect the lock # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: lars # Host: dl145h.mysql.com # Root: /users/lthalmann/bk/mysql-5.0-release-bug18116 --- 1.187/sql/log.cc 2006-02-18 17:19:10 +01:00 +++ 1.188/sql/log.cc 2006-03-31 11:47:59 +02:00 @@ -1882,7 +1882,11 @@ rotate binlog, if necessary. */ if (commit_event->get_type_code() == XID_EVENT) - thread_safe_increment(prepared_xids, &LOCK_prep_xids); + { + pthread_mutex_lock(&LOCK_prep_xids); + prepared_xids++; + pthread_mutex_unlock(&LOCK_prep_xids); + } else rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED); }