File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,9 @@ Created Apr 25, 2012 Vasil Dimov
37
37
# include " wsrep.h"
38
38
# include " log.h"
39
39
# include " wsrep_mysqld.h"
40
- extern uint32 wsrep_sst_disable_writes;
41
- # define wsrep_sst_disable_writes \
42
- my_atomic_load32_explicit (&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED)
40
+ extern Atomic_relaxed<bool > wsrep_sst_disable_writes;
43
41
#else
44
- # define wsrep_sst_disable_writes false
42
+ constexpr bool wsrep_sst_disable_writes= false ;
45
43
#endif
46
44
47
45
#include < vector>
Original file line number Diff line number Diff line change @@ -40,11 +40,9 @@ Completed 2011/7/10 Sunny and Jimmy Yang
40
40
#include " wsrep.h"
41
41
42
42
#ifdef WITH_WSREP
43
- extern uint32 wsrep_sst_disable_writes;
44
- # define wsrep_sst_disable_writes \
45
- my_atomic_load32_explicit (&wsrep_sst_disable_writes, MY_MEMORY_ORDER_RELAXED)
43
+ extern Atomic_relaxed<bool > wsrep_sst_disable_writes;
46
44
#else
47
- # define wsrep_sst_disable_writes false
45
+ constexpr bool wsrep_sst_disable_writes= false ;
48
46
#endif
49
47
50
48
/* * The FTS optimize thread's work queue. */
Original file line number Diff line number Diff line change @@ -1460,14 +1460,13 @@ bool log_checkpoint(bool sync)
1460
1460
1461
1461
ut_ad (oldest_lsn >= log_sys.last_checkpoint_lsn );
1462
1462
const lsn_t age = oldest_lsn - log_sys.last_checkpoint_lsn ;
1463
- if (age > SIZE_OF_MLOG_CHECKPOINT
1464
- + LOG_BLOCK_HDR_SIZE + LOG_BLOCK_CHECKSUM) {
1463
+ if (age > SIZE_OF_MLOG_CHECKPOINT + log_sys.framing_size ()) {
1465
1464
/* Some log has been written since the previous checkpoint. */
1466
1465
} else if (age > SIZE_OF_MLOG_CHECKPOINT
1467
1466
&& !((log_sys.log .calc_lsn_offset (oldest_lsn)
1468
1467
^ log_sys.log .calc_lsn_offset (
1469
1468
log_sys.last_checkpoint_lsn ))
1470
- & ~lsn_t ( OS_FILE_LOG_BLOCK_SIZE - 1 ) )) {
1469
+ & ~lsn_t { OS_FILE_LOG_BLOCK_SIZE - 1 } )) {
1471
1470
/* Some log has been written to the same log block. */
1472
1471
} else if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) {
1473
1472
/* MariaDB 10.3 startup expects the redo log file to be
You can’t perform that action at this time.
0 commit comments