List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:September 30 2010 10:28am
Subject:bzr commit into mysql-5.1-innodb branch (vasil.dimov:3617)
View as plain text  
#At file:///usr/local/devel/bzrroot/server/mysql-5.1-innodb/ based on revid:vasil.dimov@stripped

 3617 Vasil Dimov	2010-09-30
      Fix a potential bug when using __sync_lock_test_and_set()
      TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)
      it is not documented what happens if the two arguments are of different
      type like it was before: the first one was lock_word_t (byte) and the
      second one was 1 or 0 (int).
      Approved by:	Marko (via IRC)

=== modified file 'storage/innodb_plugin/include/os0sync.h'
--- a/storage/innodb_plugin/include/os0sync.h	revid:vasil.dimov@stripped
+++ b/storage/innodb_plugin/include/os0sync.h	revid:vasil.dimov@stripped
@@ -330,7 +330,7 @@ amount of increment. */
 Returns the old value of *ptr, atomically sets *ptr to new_val */
 # define os_atomic_test_and_set_byte(ptr, new_val) \
-	__sync_lock_test_and_set(ptr, new_val)
+	__sync_lock_test_and_set(ptr, (byte) new_val)

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-5.1-innodb branch (vasil.dimov:3617) vasil.dimov30 Sep