Bug #76949 Inconsistent unit in Datafile::m_size (pages or bytes)
Submitted: 6 May 2015 10:47 Modified: 24 Nov 2015 22:25
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.6 OS:Any
Assigned to: CPU Architecture:Any

[6 May 2015 10:47] Marko Mäkelä
Description:
The field Datafile::m_size can be measured in bytes or in pages.

SysTablespace::normalize() [renamed to normalize_size() in WL#7488] will convert it from bytes to pages.

This is confusing.

How to repeat:
Read the code.

Suggested fix:
Replace m_size with m_bytes and m_pages.

I would suggest an even bigger fix: Merge Datafile to fil_node_t and Tablespace to fil_space_t.
[24 Nov 2015 22:22] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.8.0 release, and here's the changelog entry:

The SysTablespace::parse_units() function now returns the number of pages
in a file instead of the number of megabytes. The
SysTablespace::normalize_size() function was removed. Error messages in
SysTablespace::parse_params() were revised.