Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4, 11.5(EOL)
-
None
Description
storage/innobase/buf/buf0flu.cc
Missing { } brackets:
if (scanned) |
MONITOR_INC_VALUE_CUMULATIVE(MONITOR_LRU_BATCH_SCANNED,
|
MONITOR_LRU_BATCH_SCANNED_NUM_CALL,
|
MONITOR_LRU_BATCH_SCANNED_PER_CALL,
|
scanned);
|
MONITOR_INC_VALUE_CUMULATIVE is a multiline macro, so the second statement will be executed always, regardless of “if” condition:
#define MONITOR_INC_VALUE_CUMULATIVE( \
|
monitor, monitor_n_calls, monitor_per_call, value) \
|
MONITOR_CHECK_DEFINED(value); \
|
if (MONITOR_IS_ON(monitor)) { \ |
MONITOR_VALUE(monitor_n_calls)++; \
|
MONITOR_VALUE(monitor_per_call) = (mon_type_t) (value); \
|
if (MONITOR_VALUE(monitor_per_call) \ |
> MONITOR_MAX_VALUE(monitor_per_call)) { \
|
MONITOR_MAX_VALUE(monitor_per_call) = \
|
(mon_type_t) (value); \
|
} \
|
MONITOR_VALUE(monitor) += (mon_type_t) (value); \
|
if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \ |
MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor);\
|
} \
|
}
|
Attachments
Issue Links
- is caused by
-
MDEV-15053 Reduce buf_pool_t::mutex contention
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
storage/innobase/buf/buf0flu.cc
{code:c++} if (scanned) MONITOR_INC_VALUE_CUMULATIVE(MONITOR_LRU_BATCH_SCANNED, MONITOR_LRU_BATCH_SCANNED_NUM_CALL, MONITOR_LRU_BATCH_SCANNED_PER_CALL, scanned); {code} MONITOR_INC_VALUE_CUMULATIVE is a multiline macro, so the _second_ statement will be executed always, regardless of “if” condition: {code:c++} #define MONITOR_INC_VALUE_CUMULATIVE( \ monitor, monitor_n_calls, monitor_per_call, value) \ MONITOR_CHECK_DEFINED(value); \ if (MONITOR_IS_ON(monitor)) { \ MONITOR_VALUE(monitor_n_calls)++; \ MONITOR_VALUE(monitor_per_call) = (mon_type_t) (value); \ if (MONITOR_VALUE(monitor_per_call) \ > MONITOR_MAX_VALUE(monitor_per_call)) { \ MONITOR_MAX_VALUE(monitor_per_call) = \ (mon_type_t) (value); \ } \ MONITOR_VALUE(monitor) += (mon_type_t) (value); \ if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \ MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor);\ } \ } {code} |
storage/innobase/buf/buf0flu.cc
Missing { } brackets: {code:c++} if (scanned) MONITOR_INC_VALUE_CUMULATIVE(MONITOR_LRU_BATCH_SCANNED, MONITOR_LRU_BATCH_SCANNED_NUM_CALL, MONITOR_LRU_BATCH_SCANNED_PER_CALL, scanned); {code} MONITOR_INC_VALUE_CUMULATIVE is a multiline macro, so the _second_ statement will be executed always, regardless of “if” condition: {code:c++} #define MONITOR_INC_VALUE_CUMULATIVE( \ monitor, monitor_n_calls, monitor_per_call, value) \ MONITOR_CHECK_DEFINED(value); \ if (MONITOR_IS_ON(monitor)) { \ MONITOR_VALUE(monitor_n_calls)++; \ MONITOR_VALUE(monitor_per_call) = (mon_type_t) (value); \ if (MONITOR_VALUE(monitor_per_call) \ > MONITOR_MAX_VALUE(monitor_per_call)) { \ MONITOR_MAX_VALUE(monitor_per_call) = \ (mon_type_t) (value); \ } \ MONITOR_VALUE(monitor) += (mon_type_t) (value); \ if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \ MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor);\ } \ } {code} |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.0 [ 28320 ] | |
Fix Version/s | 11.1 [ 28549 ] | |
Fix Version/s | 11.2 [ 28603 ] | |
Fix Version/s | 11.4 [ 29301 ] | |
Affects Version/s | 10.5 [ 23123 ] | |
Affects Version/s | 10.6 [ 24028 ] | |
Affects Version/s | 10.11 [ 27614 ] | |
Affects Version/s | 11.0 [ 28320 ] | |
Affects Version/s | 11.1 [ 28549 ] | |
Affects Version/s | 11.2 [ 28603 ] | |
Affects Version/s | 11.3 [ 28565 ] | |
Affects Version/s | 11.4 [ 29301 ] | |
Assignee | Marko Mäkelä [ marko ] |
Link |
This issue is caused by |
issue.field.resolutiondate | 2024-03-22 14:52:07.0 | 2024-03-22 14:52:06.988 |
Fix Version/s | 10.5.25 [ 29626 ] | |
Fix Version/s | 10.6.18 [ 29627 ] | |
Fix Version/s | 10.11.8 [ 29630 ] | |
Fix Version/s | 11.0.6 [ 29628 ] | |
Fix Version/s | 11.1.5 [ 29629 ] | |
Fix Version/s | 11.2.4 [ 29631 ] | |
Fix Version/s | 11.4.2 [ 29633 ] | |
Fix Version/s | 11.5.1 [ 29634 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.0 [ 28320 ] | |
Fix Version/s | 11.1 [ 28549 ] | |
Fix Version/s | 11.2 [ 28603 ] | |
Fix Version/s | 11.4 [ 29301 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Thank you for the report. This actually affects MariaDB Server 10.5 already.