tags 787221 + patch thanks I'm easily able to reproduce this problem and have verified that the upstream commit indeed resolves it. The attached patch applies this cherry-pick from upstream to the packaging branch.
>From e0252e96d2b808ac23f671fc6d9f314e34fff63f Mon Sep 17 00:00:00 2001 From: dann frazier <dann.fraz...@canonical.com> Date: Fri, 29 May 2015 15:56:08 -0600 Subject: [PATCH] d/p/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch: Fix data corruption on arm64 (LP: #1427406). --- debian/changelog | 7 ++++ ...7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch | 48 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 56 insertions(+) create mode 100644 debian/patches/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch diff --git a/debian/changelog b/debian/changelog index 29b1a88..cac8ace 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mariadb-10.0 (10.0.19-2) UNRELEASED; urgency=medium + + * d/p/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch: + Fix data corruption on arm64 (Closes: #787221). + + -- dann frazier <da...@debian.org> Fri, 29 May 2015 15:45:23 -0600 + mariadb-10.0 (10.0.19-1) unstable; urgency=low * New upstream release. Fixed the server crash caused by mysql_upgrade diff --git a/debian/patches/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch b/debian/patches/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch new file mode 100644 index 0000000..dbde698 --- /dev/null +++ b/debian/patches/Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch @@ -0,0 +1,48 @@ +From 70bc0a3ef40b1b9348750c12ca5df8f0863b7cfd Mon Sep 17 00:00:00 2001 +From: Alexey Kopytov <akopy...@gmail.com> +Date: Tue, 26 May 2015 23:56:00 +0300 +Subject: [PATCH] Fixes MDEV-7658: MDEV-7026 fix reintroduces MDEV-6615 on + AArch64 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is an addendum to the fix for MDEV-7026. The ARM memory model is +similar to that of PowerPC and thus needs the same semantics with +respect to memory barriers. That is, os_atomic_test_and_set_*_release() +must be a store with a release barrier followed by a full +barrier. Unlike x86 using __sync_lock_test_and_set() which is +implemented as “exclusive load with acquire barriers + exclusive store” +is insufficient in contexts where os_atomic_test_and_set_*_release() +macros are used. +--- + storage/innobase/include/os0sync.h | 2 +- + storage/xtradb/include/os0sync.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: mariadb-10.0/storage/innobase/include/os0sync.h +=================================================================== +--- mariadb-10.0.orig/storage/innobase/include/os0sync.h ++++ mariadb-10.0/storage/innobase/include/os0sync.h +@@ -452,7 +452,7 @@ Returns the old value of *ptr, atomicall + # define os_atomic_test_and_set_ulint(ptr, new_val) \ + __sync_lock_test_and_set(ptr, new_val) + +-#ifdef __powerpc__ ++#if defined(__powerpc__) || defined(__aarch64__) + /* + os_atomic_test_and_set_byte_release() should imply a release barrier before + setting, and a full barrier after. But __sync_lock_test_and_set() is only +Index: mariadb-10.0/storage/xtradb/include/os0sync.h +=================================================================== +--- mariadb-10.0.orig/storage/xtradb/include/os0sync.h ++++ mariadb-10.0/storage/xtradb/include/os0sync.h +@@ -452,7 +452,7 @@ Returns the old value of *ptr, atomicall + # define os_atomic_test_and_set_ulint(ptr, new_val) \ + __sync_lock_test_and_set(ptr, new_val) + +-#ifdef __powerpc__ ++#if defined(__powerpc__) || defined(__aarch64__) + /* + os_atomic_test_and_set_byte_release() should imply a release barrier before + setting, and a full barrier after. But __sync_lock_test_and_set() is only diff --git a/debian/patches/series b/debian/patches/series index a23ffa0..cc24687 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ fix-spelling-errors.patch mroonga-disable-switch.patch mysqld_multi_confd.patch mysqld_multi.server_lsb-header.patch +Fixes-MDEV-7658-MDEV-7026-fix-reintroduces-MDEV-6615.patch -- 2.1.4