MDEV-21024: Cleanup XDES_CLEAN_BIT

The XDES_CLEAN_BIT is always set for every element of
the page allocation bitmap in the extent descriptor pages.
Do not bother touching it, to avoid redundant writes.
This commit is contained in:
Marko Mäkelä 2019-11-11 14:18:50 +02:00
parent 878bc854d9
commit 142442d571

View file

@ -1524,7 +1524,8 @@ fsp_free_page(
const ulint bit = offset % FSP_EXTENT_SIZE; const ulint bit = offset % FSP_EXTENT_SIZE;
xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr);
xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); /* xdes_init() should have set all XDES_CLEAN_BIT */
ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit));
frag_n_used = mtr_read_ulint(header + FSP_FRAG_N_USED, MLOG_4BYTES, frag_n_used = mtr_read_ulint(header + FSP_FRAG_N_USED, MLOG_4BYTES,
mtr); mtr);
@ -3085,7 +3086,8 @@ fseg_free_page_low(
const ulint bit = offset % FSP_EXTENT_SIZE; const ulint bit = offset % FSP_EXTENT_SIZE;
xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr);
xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); /* xdes_init() should have set all XDES_CLEAN_BIT */
ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit));
if (xdes_is_free(descr, mtr)) { if (xdes_is_free(descr, mtr)) {
/* The extent has become free: free it to space */ /* The extent has become free: free it to space */