diff -Nru mysql-5.6-5.6.23/debian/changelog mysql-5.6-5.6.23/debian/changelog --- mysql-5.6-5.6.23/debian/changelog 2015-02-18 17:17:49.000000000 +0000 +++ mysql-5.6-5.6.23/debian/changelog 2015-02-27 00:41:01.000000000 +0000 @@ -1,3 +1,11 @@ +mysql-5.6 (5.6.23-1~exp1~ubuntu2+lp1427406.1) vivid; urgency=medium + + * Port corruption fixes for ppc64 and arm64 from MariaDB + - MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch + - MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch + + -- dann frazier Thu, 26 Feb 2015 17:32:18 -0700 + mysql-5.6 (5.6.23-1~exp1~ubuntu2) vivid; urgency=medium * Ubuntu upload from Debian VCS commit 841825f. diff -Nru mysql-5.6-5.6.23/debian/patches/MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch mysql-5.6-5.6.23/debian/patches/MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch --- mysql-5.6-5.6.23/debian/patches/MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-5.6-5.6.23/debian/patches/MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch 2015-02-27 00:38:26.000000000 +0000 @@ -0,0 +1,51 @@ +Index: mysql-5.6-5.6.23/storage/innobase/include/os0sync.h +=================================================================== +--- mysql-5.6-5.6.23.orig/storage/innobase/include/os0sync.h ++++ mysql-5.6-5.6.23/storage/innobase/include/os0sync.h +@@ -438,6 +438,9 @@ 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) + ++# define os_atomic_lock_release_byte(ptr) \ ++ __sync_lock_release(ptr) ++ + #elif defined(HAVE_IB_SOLARIS_ATOMICS) + + # define HAVE_ATOMIC_BUILTINS +@@ -520,6 +523,9 @@ Returns the old value of *ptr, atomicall + # define os_atomic_test_and_set_ulint(ptr, new_val) \ + atomic_swap_ulong(ptr, new_val) + ++# define os_atomic_lock_release_byte(ptr) \ ++ (void) atomic_swap_uchar(ptr, 0) ++ + #elif defined(HAVE_WINDOWS_ATOMICS) + + # define HAVE_ATOMIC_BUILTINS +@@ -644,6 +650,9 @@ clobbered */ + # define os_atomic_test_and_set_ulong(ptr, new_val) \ + InterlockedExchange(ptr, new_val) + ++# define os_atomic_lock_release_byte(ptr) \ ++ (void) InterlockedExchange(ptr, 0) ++ + #else + # define IB_ATOMICS_STARTUP_MSG \ + "Mutexes and rw_locks use InnoDB's own implementation" +Index: mysql-5.6-5.6.23/storage/innobase/include/sync0sync.ic +=================================================================== +--- mysql-5.6-5.6.23.orig/storage/innobase/include/sync0sync.ic ++++ mysql-5.6-5.6.23/storage/innobase/include/sync0sync.ic +@@ -113,11 +113,8 @@ mutex_reset_lock_word( + ib_mutex_t* mutex) /*!< in: mutex */ + { + #if defined(HAVE_ATOMIC_BUILTINS) +- /* In theory __sync_lock_release should be used to release the lock. +- Unfortunately, it does not work properly alone. The workaround is +- that more conservative __sync_lock_test_and_set is used instead. */ + # if defined(HAVE_ATOMIC_BUILTINS_BYTE) +- os_atomic_test_and_set_byte(&mutex->lock_word, 0); ++ os_atomic_lock_release_byte(&mutex->lock_word); + # else + os_atomic_test_and_set_ulint(&mutex->lock_word, 0); + # endif diff -Nru mysql-5.6-5.6.23/debian/patches/MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch mysql-5.6-5.6.23/debian/patches/MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch --- mysql-5.6-5.6.23/debian/patches/MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-5.6-5.6.23/debian/patches/MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch 2015-02-27 00:39:39.000000000 +0000 @@ -0,0 +1,107 @@ +Index: mysql-5.6-5.6.23/storage/innobase/include/sync0rw.h +=================================================================== +--- mysql-5.6-5.6.23.orig/storage/innobase/include/sync0rw.h ++++ mysql-5.6-5.6.23/storage/innobase/include/sync0rw.h +@@ -108,14 +108,8 @@ extern ib_mutex_t rw_lock_list_mutex; + #ifdef UNIV_SYNC_DEBUG + /* The global mutex which protects debug info lists of all rw-locks. + To modify the debug info list of an rw-lock, this mutex has to be +- + acquired in addition to the mutex protecting the lock. */ +-extern ib_mutex_t rw_lock_debug_mutex; +-extern os_event_t rw_lock_debug_event; /*!< If deadlock detection does +- not get immediately the mutex it +- may wait for this event */ +-extern ibool rw_lock_debug_waiters; /*!< This is set to TRUE, if +- there may be waiters for the event */ ++extern os_fast_mutex_t rw_lock_debug_mutex; + #endif /* UNIV_SYNC_DEBUG */ + + /** Counters for RW locks. */ +Index: mysql-5.6-5.6.23/storage/innobase/sync/sync0rw.cc +=================================================================== +--- mysql-5.6-5.6.23.orig/storage/innobase/sync/sync0rw.cc ++++ mysql-5.6-5.6.23/storage/innobase/sync/sync0rw.cc +@@ -151,18 +151,12 @@ UNIV_INTERN mysql_pfs_key_t rw_lock_mute + To modify the debug info list of an rw-lock, this mutex has to be + acquired in addition to the mutex protecting the lock. */ + +-UNIV_INTERN ib_mutex_t rw_lock_debug_mutex; ++UNIV_INTERN os_fast_mutex_t rw_lock_debug_mutex; + + # ifdef UNIV_PFS_MUTEX + UNIV_INTERN mysql_pfs_key_t rw_lock_debug_mutex_key; + # endif + +-/* If deadlock detection does not get immediately the mutex, +-it may wait for this event */ +-UNIV_INTERN os_event_t rw_lock_debug_event; +-/* This is set to TRUE, if there may be waiters for the event */ +-UNIV_INTERN ibool rw_lock_debug_waiters; +- + /******************************************************************//** + Creates a debug info struct. */ + static +@@ -699,22 +693,7 @@ void + rw_lock_debug_mutex_enter(void) + /*===========================*/ + { +-loop: +- if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { +- return; +- } +- +- os_event_reset(rw_lock_debug_event); +- +- rw_lock_debug_waiters = TRUE; +- +- if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { +- return; +- } +- +- os_event_wait(rw_lock_debug_event); +- +- goto loop; ++ os_fast_mutex_lock(&rw_lock_debug_mutex); + } + + /******************************************************************//** +@@ -724,12 +703,7 @@ void + rw_lock_debug_mutex_exit(void) + /*==========================*/ + { +- mutex_exit(&rw_lock_debug_mutex); +- +- if (rw_lock_debug_waiters) { +- rw_lock_debug_waiters = FALSE; +- os_event_set(rw_lock_debug_event); +- } ++ os_fast_mutex_unlock(&rw_lock_debug_mutex); + } + + /******************************************************************//** +Index: mysql-5.6-5.6.23/storage/innobase/sync/sync0sync.cc +=================================================================== +--- mysql-5.6-5.6.23.orig/storage/innobase/sync/sync0sync.cc ++++ mysql-5.6-5.6.23/storage/innobase/sync/sync0sync.cc +@@ -1473,11 +1473,7 @@ sync_init(void) + SYNC_NO_ORDER_CHECK); + + #ifdef UNIV_SYNC_DEBUG +- mutex_create(rw_lock_debug_mutex_key, &rw_lock_debug_mutex, +- SYNC_NO_ORDER_CHECK); +- +- rw_lock_debug_event = os_event_create(); +- rw_lock_debug_waiters = FALSE; ++ os_fast_mutex_init(rw_lock_debug_mutex_key, &rw_lock_debug_mutex); + #endif /* UNIV_SYNC_DEBUG */ + } + +@@ -1545,6 +1541,7 @@ sync_close(void) + sync_order_checks_on = FALSE; + + sync_thread_level_arrays_free(); ++ os_fast_mutex_free(&rw_lock_debug_mutex); + #endif /* UNIV_SYNC_DEBUG */ + + sync_initialized = FALSE; diff -Nru mysql-5.6-5.6.23/debian/patches/series mysql-5.6-5.6.23/debian/patches/series --- mysql-5.6-5.6.23/debian/patches/series 2015-02-11 15:10:18.000000000 +0000 +++ mysql-5.6-5.6.23/debian/patches/series 2015-02-27 00:39:04.000000000 +0000 @@ -6,3 +6,5 @@ kfreebsd_tests.patch spelling.patch fix-mysqlhotcopy-test-failure.patch +MDEV-6450-MariaDB-crash-on-Power8-when-built-with-advance-tool-chain.patch +MDEV-6483-Deadlock_around_rw_lock_debug_mutex_on_PPC64.patch