Skip to content

Commit b40f9d3

Browse files
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
1 parent 92ce771 commit b40f9d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/innobase/fsp/fsp0fsp.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3465,10 +3465,10 @@ dberr_t fsp_traverse_extents(
34653465
else
34663466
{
34673467
err= old_xdes_entry->insert(0, mtr);
3468-
if (err) return err;
3469-
if (threshold & (srv_page_size - 1))
3468+
if (err == DB_SUCCESS && threshold & (srv_page_size - 1))
34703469
err= old_xdes_entry->insert(
34713470
xdes_calc_descriptor_page(0, threshold), mtr);
3471+
if (err) return err;
34723472
}
34733473

34743474
buf_block_t *block= nullptr;

0 commit comments

Comments
 (0)