 +
 +  if (semi_sync_status) {
 +    /* Semi-sync status is OFF now. */
-+    thread_safe_sub(rpl_semi_sync_slave_status, 1, &LOCK_stats);
++    thread_safe_sub(rpl_semi_sync_slave_status, 1, &LOCK_status);
 +  }
 +
    close_thread_tables(thd, 0);

+drop table t1;
diff -ruN base/mysql-test/rpl_transaction_test/r/rpl_transaction_001.result mysql50gpl_semi_sync/mysql-test/rpl_transaction_test/r/rpl_transaction_001.result
--- base/mysql-test/rpl_transaction_test/r/rpl_transaction_001.result	1969-12-31 16:00:00.000000000 -0800
+++ mysql50gpl_semi_sync/mysql-test/rpl_transaction_test/r/rpl_transaction_001.result	2007-04-27 20:14:07.298023000 -0700
@@ -0,0 +1,143 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;

+
+  if (flags & BINLOG_SEMI_SYNC) {
+    /* One more semi-sync clients. */
+    thread_safe_increment(rpl_semi_sync_clients, &LOCK_status);
+  }
 
 #ifndef DBUG_OFF
