MDEV-21174: Fix undefined behaviour
ibuf_bitmap_page_set_bits(): Do not attempt to shift by a negative amount. This bug was introduced in commit 87839258f86196dfca1d3af2a947e570e13eeb94.
This commit is contained in:
parent
46fc3bdbca
commit
6189774c37
@ -657,7 +657,7 @@ ibuf_bitmap_page_set_bits(
|
||||
ut_ad(bit_offset + 1 < 8);
|
||||
ut_ad(val <= 3);
|
||||
b &= ~(3U << bit_offset);
|
||||
b |= (val & 2) << (bit_offset - 1)
|
||||
b |= ((val & 2) >> 1) << bit_offset
|
||||
| (val & 1) << (bit_offset + 1);
|
||||
} else {
|
||||
ut_ad(val <= 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user