Commit graph

28 commits

Author SHA1 Message Date
Sergei Golubchik
309c08c17c Merge branch '5.5' into 10.0 2016-08-10 19:19:05 +02:00
Vicențiu Ciorbaru
5ad02062d9 MDEV-10341: InnoDB: Failing assertion: mutex_own(mutex) - mutex_exit_func
Fix memory barrier issues on releasing mutexes. We must have a full
memory barrier between releasing a mutex lock and reading its waiters.
This prevents us from missing to release waiters due to reading the
number of waiters speculatively before releasing the lock. If threads
try and wait between us reading the waiters count and releasing the
lock, those threads might stall indefinitely.

Also, we must use proper ACQUIRE/RELEASE semantics for atomic
operations, not ACQUIRE/ACQUIRE.
2016-08-09 23:34:44 +03:00
Sergei Golubchik
b3f4cf7c13 Merge branch 'merge-xtradb-5.6' into 0.0 2016-06-21 15:27:09 +02:00
Sergei Golubchik
b42664e85e 5.6.30-76.3 2016-06-21 14:20:09 +02:00
Sergei Golubchik
359ae59ac0 Merge branch 'merge/merge-xtradb-5.6' into 10.0 2015-12-13 16:23:02 +01:00
Sergei Golubchik
1e270d504d 5.6.27-76.0 2015-12-13 10:13:18 +01:00
Sergei Golubchik
142b725607 Merge branch 'merge/merge-xtradb-5.5' into 5.5
5.5.46-37.6
2015-12-09 12:57:04 +01:00
Sergei Golubchik
9457139e59 5.5.46-37.6 2015-12-09 12:27:04 +01:00
Sergei Golubchik
14a142fca6 move to storage/xtradb 2015-05-04 19:15:28 +02:00
Sergei Golubchik
fd39c56eff move to storage/xtradb/ 2015-04-27 23:37:51 +02:00
Sergei Golubchik
afca52bb52 5.5 merge 2014-11-20 15:26:31 +01:00
Kristian Nielsen
6ea41f1e84 MDEV-7026: Race in InnoDB/XtraDB mutex implementation can stall or hang the server.
The bug was that full memory barrier was missing in the code that ensures that
a waiter on an InnoDB mutex will not go to sleep unless it is guaranteed to be
woken up again by another thread currently holding the mutex. This made
possible a race where a thread could get stuck waiting for a mutex that is in
fact no longer locked. If that thread was also holding other critical locks,
this could stall the entire server. There is an error monitor thread than can
break the stall, it runs about once per second. But if the error monitor
thread itself got stuck or was not running, then the entire server could hang
infinitely.

This was introduced on i386/amd64 platforms in 5.5.40 and 10.0.13 by an
incorrect patch that tried to fix the similar problem for PowerPC.

This commit reverts the incorrect PowerPC patch, and instead implements a fix
for PowerPC that does not change i386/amd64 behaviour, making PowerPC work
similarly to i386/amd64.
2014-11-19 13:56:46 +01:00
Sergei Golubchik
4a68817d8d XtraDB 5.6.20-68.0 2014-09-11 16:44:16 +02:00
Sergey Vojtovich
40497577ff Backport from 10.0:
MDEV-6450 - MariaDB crash on Power8 when built with advance tool
            chain

InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().

The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.

Fixed by creating proper barrier at mutex_exit() by using
__sync_lock_release() instead of __sync_test_and_set().
2014-08-29 16:02:46 +04:00
Michael Widenius
5569132ffe MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.

- Added memory syncronization for innodb & xtradb for power8.
- Added HAVE_WINDOWS_MM_FENCE to CMakeList.txt
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_monitor_thread to ensur
  if log mutex is locked.

All changes done both for InnoDB and Xtradb
2014-08-19 19:28:35 +03:00
Michael Widenius
bd2117d154 Automatic merge from 5.5
Fixed 2 failing tests by replacing result files
2014-08-19 21:35:14 +03:00
Sergey Vojtovich
c0ebb3f388 MDEV-6450 - MariaDB crash on Power8 when built with advance tool
chain

InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().

The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.

Fixed by creating proper barrier at mutex_exit() by using
__sync_lock_release() instead of __sync_test_and_set().
2014-07-18 15:16:25 +04:00
Sergei Golubchik
a2807e41e8 xtradb 5.6.17-65.0 2014-05-07 17:33:33 +02:00
Sergei Golubchik
41c760b121 merge 2014-02-28 10:00:31 +01:00
Alexander Barkov
57cdc561fc Fixing AIX compilation failires 2014-02-27 19:44:00 +04:00
Sergei Golubchik
570c1a6fef MDEV-5672 MariaDB 10.0.8 doesn't compile without perfschema
apply the upstream patch
2014-02-27 12:25:51 +01:00
Sergei Golubchik
ac585e9ed5 Percona-Server-5.6.15-rel63.0.tar.gz merge 2014-02-26 19:21:23 +01:00
Sergei Golubchik
ffa8c4cfcc Percona-Server-5.6.14-rel62.0 merge
support ha_innodb.so as a dynamic plugin.
* remove obsolete *,innodb_plugin.rdiff files
* s/--plugin-load=/--plugin-load-add=/
* MYSQL_PLUGIN_IMPORT glob_hostname[]
* use my_error instead of push_warning_printf(ER_DEFAULT)
* don't use tdc_size and tc_size in a module

update test cases (XtraDB is 5.6.14, InnoDB is 5.6.10)
* copy new tests over
* disable some tests for (old) InnoDB
* delete XtraDB tests that no longer apply

small compatibility changes:
* s/HTON_EXTENDED_KEYS/HTON_SUPPORTS_EXTENDED_KEYS/
* revert unnecessary InnoDB changes to make it a bit closer to the upstream

fix XtraDB to compile on Windows (both as a static and a dynamic plugin)

disable XtraDB on Windows (deadlocks) and where no atomic ops are available (e.g. CentOS 5)


storage/innobase/handler/ha_innodb.cc:
  revert few unnecessary changes to make it a bit closer to the original InnoDB
storage/innobase/include/univ.i:
  correct the version to match what it was merged from
2013-12-22 17:06:50 +01:00
Sergei Golubchik
1904a5d0cc Percona-Server-5.5.33-rel31.1.tar.gz 2013-09-07 13:49:15 +02:00
unknown
a6c7c53b63 Merge XtraDB from Percona-server-5.5.17-rel22.1 into MariaDB 5.5 2011-12-15 10:34:14 +01:00
Sergei Golubchik
4e46d8e5bf merge with xtradb-5.5.15
fix test cases
2011-07-18 23:04:24 +02:00
unknown
898f6f48b7 Merge XtraDB 8 into MariaDB. 2009-11-13 22:26:08 +01:00
unknown
a6b7f71329 Import Percona XtraDB into the MariaDB source tree. 2009-06-09 13:16:11 +02:00