From cbdf62ae907ad42ceb7a65e070b821bb45e07be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 6 Apr 2022 10:13:21 +0300 Subject: MDEV-25975 merge fixup --- storage/innobase/dict/dict0stats_bg.cc | 6 ++---- storage/innobase/fts/fts0opt.cc | 6 ++---- storage/innobase/log/log0log.cc | 5 ++--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index d2a72695d4e..4968612e964 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -37,11 +37,9 @@ Created Apr 25, 2012 Vasil Dimov # include "wsrep.h" # include "log.h" # include "wsrep_mysqld.h" -extern uint32 wsrep_sst_disable_writes; -# define wsrep_sst_disable_writes \ - my_atomic_load32_explicit(&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED) +extern Atomic_relaxed wsrep_sst_disable_writes; #else -# define wsrep_sst_disable_writes false +constexpr bool wsrep_sst_disable_writes= false; #endif #include diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index ab75968ec91..bb8d9c13d68 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -40,11 +40,9 @@ Completed 2011/7/10 Sunny and Jimmy Yang #include "wsrep.h" #ifdef WITH_WSREP -extern uint32 wsrep_sst_disable_writes; -# define wsrep_sst_disable_writes \ - my_atomic_load32_explicit(&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED) +extern Atomic_relaxed wsrep_sst_disable_writes; #else -# define wsrep_sst_disable_writes false +constexpr bool wsrep_sst_disable_writes= false; #endif /** The FTS optimize thread's work queue. */ diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index c58df6314e9..bf75b3b7c86 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -1460,14 +1460,13 @@ bool log_checkpoint(bool sync) ut_ad(oldest_lsn >= log_sys.last_checkpoint_lsn); const lsn_t age = oldest_lsn - log_sys.last_checkpoint_lsn; - if (age > SIZE_OF_MLOG_CHECKPOINT - + LOG_BLOCK_HDR_SIZE + LOG_BLOCK_CHECKSUM) { + if (age > SIZE_OF_MLOG_CHECKPOINT + log_sys.framing_size()) { /* Some log has been written since the previous checkpoint. */ } else if (age > SIZE_OF_MLOG_CHECKPOINT && !((log_sys.log.calc_lsn_offset(oldest_lsn) ^ log_sys.log.calc_lsn_offset( log_sys.last_checkpoint_lsn)) - & ~lsn_t(OS_FILE_LOG_BLOCK_SIZE - 1))) { + & ~lsn_t{OS_FILE_LOG_BLOCK_SIZE - 1})) { /* Some log has been written to the same log block. */ } else if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) { /* MariaDB 10.3 startup expects the redo log file to be -- cgit v1.2.1