Skip to content

Commit b1317c1

Browse files
committed
MDEV-31628: InnoDB reports the wrong system tablespace size on bootstrap
SysTablespace::set_size(): Use correct 64-bit arithmetics for reporting the initial size of the InnoDB system or temporary tablespace.
1 parent 35de832 commit b1317c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

storage/innobase/fsp/fsp0sysspace.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,19 +393,19 @@ SysTablespace::set_size(
393393
Datafile& file)
394394
{
395395
ut_ad(!srv_read_only_mode || m_ignore_read_only);
396+
const ib::bytes_iec b{uint64_t{file.m_size} << srv_page_size_shift};
396397

397398
/* We created the data file and now write it full of zeros */
398-
ib::info() << "Setting file '" << file.filepath() << "' size to "
399-
<< ib::bytes_iec{file.m_size << srv_page_size_shift} <<
400-
". Physically writing the file full; Please wait ...";
399+
ib::info() << "Setting file '" << file.filepath() << "' size to " << b
400+
<< ". Physically writing the file full; Please wait ...";
401401

402402
bool success = os_file_set_size(
403403
file.m_filepath, file.m_handle,
404404
static_cast<os_offset_t>(file.m_size) << srv_page_size_shift);
405405

406406
if (success) {
407407
ib::info() << "File '" << file.filepath() << "' size is now "
408-
<< ib::bytes_iec{file.m_size << srv_page_size_shift}
408+
<< b
409409
<< ".";
410410
} else {
411411
ib::error() << "Could not set the file size of '"

0 commit comments

Comments
 (0)