From 83a326f28c1938d72583e62c6eda7c18d8a87b61 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 31 Mar 2006 11:48:08 +0200 Subject: BUG#18116: Changed of how mutex is handled for XA and rotating binlog sql/log.cc: thread_safe_increment is done as an atomic operation on some platforms and that does not respect the lock --- sql/log.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/log.cc b/sql/log.cc index 85e8c4dae2f..ba02c9ba082 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1882,7 +1882,11 @@ DBUG_skip_commit: 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); } -- cgit v1.2.1