diff options
author | Shaohua Wang <shaohua.wang@oracle.com> | 2015-08-10 16:31:05 +0800 |
---|---|---|
committer | Shaohua Wang <shaohua.wang@oracle.com> | 2015-08-10 16:31:05 +0800 |
commit | f59d68eeae37338d7b25f2571407e763fa897e15 (patch) | |
tree | d6048029d66a180b61ec8a3679b17ecdf210c9a7 /storage/innobase/include/sync0sync.h | |
parent | 552b1c8ab6663dd942a123cf2a8a7b31ad051a2d (diff) | |
download | mariadb-git-f59d68eeae37338d7b25f2571407e763fa897e15.tar.gz |
BUG#21102971 data corruption on arm64
The root cause is that x86 has a stronger memory model than the ARM
processors. And the GCC builtins didn't issue the correct fences when
setting/unsetting the lock word. In particular during the mutex release.
The solution is rewriting atomic TAS operations: replace '__sync_' by
'__atomic_' if possible.
Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
Reviewed-by: Bin Su <bin.x.su@oracle.com>
Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>
Reviewed-by: Krunal Bauskar <krunal.bauskar@oracle.com>
RB: 9782
RB: 9665
RB: 9783
Diffstat (limited to 'storage/innobase/include/sync0sync.h')
-rw-r--r-- | storage/innobase/include/sync0sync.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 9b07c4758c9..b50735f4ad0 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -45,13 +45,6 @@ Created 9/5/1995 Heikki Tuuri extern my_bool timed_mutexes; #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */ -#ifdef HAVE_WINDOWS_ATOMICS -typedef LONG lock_word_t; /*!< On Windows, InterlockedExchange operates - on LONG variable */ -#else -typedef byte lock_word_t; -#endif - #if defined UNIV_PFS_MUTEX || defined UNIV_PFS_RWLOCK /* There are mutexes/rwlocks that we want to exclude from instrumentation even if their corresponding performance schema |