Browse Source

MDEV-35289 innodb_fast_shutdown=0 might corrupt the system tablespace on 32-bit systems

inode_info::get_unused(): Do not try to assign 64 bits
into a potentially narrower variable.
11.2 mariadb-11.2.6
Marko Mäkelä 12 months ago
parent
commit
67c0fd2a41
  1. 5
      storage/innobase/fsp/fsp0fsp.cc

5
storage/innobase/fsp/fsp0fsp.cc

@ -3645,14 +3645,15 @@ public:
{
const fseg_inode_t *inode=
fsp_seg_inode_page_get_nth_inode(block->page.frame, i);
ulint seg_id= mach_read_from_8(FSEG_ID + inode);
/* Consider TRX_SYS_FSEG_HEADER as used segment.
While reinitializing the undo tablespace, InnoDB
fail to reset the value of TRX_SYS_FSEG_HEADER
in TRX_SYS page. so InnoDB shouldn't consider
this segment as unused one */
if (seg_id == 0 || seg_id == 2)
switch (mach_read_from_8(FSEG_ID + inode)) {
case 0: case 2:
continue;
}
uint16_t offset= uint16_t(inode - block->page.frame);
if (offset < FIL_PAGE_DATA ||
offset >= block->physical_size() - FIL_PAGE_DATA_END)

Loading…
Cancel
Save