Skip to content

Commit d04d0f1

Browse files
authored
Merge pull request MariaDB#39 from cvicentiu/master
Update patch that reverts changes from 10.0.26 that caused regression on PowerPC
2 parents d5af196 + de356c1 commit d04d0f1

File tree

4 files changed

+84
-29
lines changed

4 files changed

+84
-29
lines changed

debian/changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ mariadb-10.0 (10.0.26-1) unstable; urgency=low
4848
* New upstream release 10.0.26
4949
* Refresh patches after 10.0.26 import
5050

51+
[ Vicențiu Ciorbaru ]
52+
* Revert innodb and xtradb PowerPC synchronization fix from upstream 10.0.26
53+
5154
-- Otto Kekäläinen <[email protected]> Fri, 24 Jun 2016 17:05:44 +0300
5255

5356
mariadb-10.0 (10.0.25-1) unstable; urgency=low

debian/patches/fix-ppc64el-build-regression.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Description: Revert innodb and xtradb PowerPC synchronization from 10.0.26
2+
On PowerPC 64 Little Endian we have synchronization problems that causes
3+
warnings in test cases. The patch reverts these changes from 10.0.26 that
4+
caused this regression.
5+
6+
The patch was initially proposed by Sergey Vojtovich, altered slightly to
7+
have it compile.
8+
.
9+
This patch should be removed when upstream provides an adequate fix.
10+
Author: Vicențiu Ciorbaru <[email protected]>
11+
diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h
12+
index 1cf4e9c..1abb774 100644
13+
--- a/storage/innobase/include/os0sync.h
14+
+++ b/storage/innobase/include/os0sync.h
15+
@@ -492,7 +492,8 @@ inline
16+
lock_word_t
17+
os_atomic_clear(volatile lock_word_t* ptr)
18+
{
19+
- return(__sync_lock_test_and_set(ptr, 0));
20+
+ __sync_lock_release(ptr);
21+
+ return *ptr;
22+
}
23+
24+
# elif defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET)
25+
@@ -861,6 +862,7 @@ for synchronization */
26+
architecture. Disable memory barrier for Intel architecture for now. */
27+
# define os_rmb do { } while(0)
28+
# define os_wmb do { } while(0)
29+
+# define os_mb do { } while(0)
30+
# define os_isync do { } while(0)
31+
# define IB_MEMORY_BARRIER_STARTUP_MSG \
32+
"Memory barrier is not used"
33+
diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic
34+
index 55f728f..0b6858a 100644
35+
--- a/storage/innobase/include/sync0sync.ic
36+
+++ b/storage/innobase/include/sync0sync.ic
37+
@@ -178,6 +178,8 @@ mutex_exit_func(
38+
to wake up possible hanging threads if
39+
they are missed in mutex_signal_object. */
40+
41+
+ os_mb;
42+
+
43+
if (mutex_get_waiters(mutex) != 0) {
44+
45+
mutex_signal_object(mutex);
46+
diff --git a/storage/xtradb/include/os0sync.h b/storage/xtradb/include/os0sync.h
47+
index 0f93f3f..2aa9478 100644
48+
--- a/storage/xtradb/include/os0sync.h
49+
+++ b/storage/xtradb/include/os0sync.h
50+
@@ -543,7 +543,8 @@ inline
51+
lock_word_t
52+
os_atomic_clear(volatile lock_word_t* ptr)
53+
{
54+
- return(__sync_lock_test_and_set(ptr, 0));
55+
+ __sync_lock_release(ptr);
56+
+ return *ptr;
57+
}
58+
59+
# elif defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET)
60+
@@ -912,6 +913,7 @@ for synchronization */
61+
architecture. Disable memory barrier for Intel architecture for now. */
62+
# define os_rmb do { } while(0)
63+
# define os_wmb do { } while(0)
64+
+# define os_mb do { } while(0)
65+
# define os_isync do { } while(0)
66+
# define IB_MEMORY_BARRIER_STARTUP_MSG \
67+
"Memory barrier is not used"
68+
diff --git a/storage/xtradb/include/sync0sync.ic b/storage/xtradb/include/sync0sync.ic
69+
index 00db854..fac83a4 100644
70+
--- a/storage/xtradb/include/sync0sync.ic
71+
+++ b/storage/xtradb/include/sync0sync.ic
72+
@@ -181,6 +181,8 @@ mutex_exit_func(
73+
to wake up possible hanging threads if
74+
they are missed in mutex_signal_object. */
75+
76+
+ os_mb;
77+
+
78+
if (mutex_get_waiters(mutex) != 0) {
79+
80+
mutex_signal_object(mutex);

debian/patches/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ mdev-8375-built-in-auth-socket.patch
1616
mdev-8375-passwordless-accounts-for-testsuite.patch
1717
mdev-9528-mysql_embedded.patch
1818
man_page_tokuftdump.patch
19-
fix-ppc64el-build-regression.patch
19+
innodb_xtradb_10.0.26_regression.patch

0 commit comments

Comments
 (0)