[MDEV-28525] Some conditions around btr_latch_mode could be eliminated Created: 2022-05-10 Updated: 2022-06-06 Resolved: 2022-06-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9 |
| Fix Version/s: | 10.6.9, 10.7.5, 10.8.4, 10.9.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance | ||
| 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
would replace conditional code like the following:
|