MDEV-34374 Shrinking tablespace logic fails to handle error condition

- InnoDB ignores the error while traversing the used
extents during shrinking process. Made changes in
fsp_traverse_extents() to handle error condition
correctly
parent 92ce7716
...@@ -3465,10 +3465,10 @@ dberr_t fsp_traverse_extents( ...@@ -3465,10 +3465,10 @@ dberr_t fsp_traverse_extents(
else else
{ {
err= old_xdes_entry->insert(0, mtr); err= old_xdes_entry->insert(0, mtr);
if (err) return err; if (err == DB_SUCCESS && threshold & (srv_page_size - 1))
if (threshold & (srv_page_size - 1))
err= old_xdes_entry->insert( err= old_xdes_entry->insert(
xdes_calc_descriptor_page(0, threshold), mtr); xdes_calc_descriptor_page(0, threshold), mtr);
if (err) return err;
} }
buf_block_t *block= nullptr; buf_block_t *block= nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment