Merge 10.5 into 10.6 (except MDEV-24630)

Commit 76d2846a71 was for 10.5 only.
It caused some performance regression on 10.6 in some cases,
likely related to the removal of ib_mutex_t in MDEV-21452.
This commit is contained in:
Marko Mäkelä 2021-03-30 13:28:05 +03:00
commit 75db05c599
7 changed files with 71 additions and 69 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2020, MariaDB
/* Copyright (c) 2020, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -41,7 +41,9 @@ public:
Atomic_relaxed(Type val) : m(val) {}
Atomic_relaxed() {}
operator Type() const { return m.load(std::memory_order_relaxed); }
Type load(std::memory_order o= std::memory_order_relaxed) const
{ return m.load(o); }
operator Type() const { return m.load(); }
Type operator=(const Type val)
{ m.store(val, std::memory_order_relaxed); return val; }
Type operator=(const Atomic_relaxed<Type> &rhs) { return *this= Type{rhs}; }