Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
Description
The types btr_latch_mode and mtr_memo_type_t are partly derived from rw_lock_type_t. Despite that, some code for converting between them is using conditions instead of bitwise arithmetics.
If we align btr_latch_mode better with mtr_memo_type_t, some conversions by bitwise arithmetics will become possible. For example, the arithmetic expression
const rw_lock_type_t mode = rw_lock_type_t( |
latch_mode & (RW_X_LATCH | RW_S_LATCH));
|
would replace conditional code like the following:
mode = latch_mode == BTR_MODIFY_LEAF ? RW_X_LATCH : RW_S_LATCH;
|