Browse Source

MDEV-9977: Crash when accessing large (>4G) InnoDB table on

MariaDB 10.1.x 32-bit binaries.

Problem was the fact that tablespace size was incorrectly
rounded to next extent size (1M).
pull/171/head
Jan Lindström 10 years ago
parent
commit
ea83c1d7c6
  1. 6
      storage/innobase/fil/fil0fil.cc
  2. 8
      storage/xtradb/fil/fil0fil.cc

6
storage/innobase/fil/fil0fil.cc

@ -737,11 +737,9 @@ fil_node_open_file(
}
}
if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
if (size_bytes >= (1024*1024)) {
/* Truncate the size to whole extent size. */
size_bytes = ut_2pow_round(size_bytes,
FSP_EXTENT_SIZE *
UNIV_PAGE_SIZE);
size_bytes = ut_2pow_round(size_bytes, (1024*1024));
}
if (!fsp_flags_is_compressed(flags)) {

8
storage/xtradb/fil/fil0fil.cc

@ -739,11 +739,9 @@ fil_node_open_file(
}
}
if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
if (size_bytes >= (1024*1024)) {
/* Truncate the size to whole extent size. */
size_bytes = ut_2pow_round(size_bytes,
FSP_EXTENT_SIZE *
UNIV_PAGE_SIZE);
size_bytes = ut_2pow_round(size_bytes, (1024*1024));
}
if (!fsp_flags_is_compressed(flags)) {
@ -5683,7 +5681,7 @@ fil_space_get_node(
/* Found! */
break;
} else {
*block_offset -= node->size;
(*block_offset) -= node->size;
node = UT_LIST_GET_NEXT(chain, node);
}
}

Loading…
Cancel
Save