Bug #71994 Wrong statement in the note about InnoDB Tablespace Monitor's deprecation
Submitted: 10 Mar 2014 15:20 Modified: 11 Mar 2014 12:43
Reporter: Valeriy Kravchuk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Daniel Price CPU Architecture:Any
Tags: information_schema, InnoDB Tablespace Monitor, performance_schema

[10 Mar 2014 15:20] Valeriy Kravchuk
Description:
Manual (http://dev.mysql.com/doc/refman/5.6/en/innodb-monitors.html) has the following note repeated more than once:

"Note

The InnoDB Tablesapce Monitor is deprecated and may be removed in a future release. Similar information can be obtained from InnoDB INFORMATION_SCHEMA and PERFORMANCE_SCHEMA tables. See Section 20.30, “INFORMATION_SCHEMA Tables for InnoDB” and Chapter 21, MySQL Performance Schema."

I wonder what exact table(s) in the INFORMATION_SCHEMA or performance_schema may be used to get information like this about the content of shared tablespace:

================================================
2014-03-10 17:08:53 1f48 INNODB TABLESPACE MONITOR OUTPUT
================================================
FILE SPACE INFO: id 0
size 64768, free limit 5440, free extents 72
not full frag extents 5: used pages 274, full frag extents 3
first seg id not used 560
SEGMENT id 1 space 0; page 2; res 224 used 176; full ext 2
fragm pages 32; free extents 0; not full extents 1: pages 16
SEGMENT id 2 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 3 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 4 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 5 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 6 space 0; page 2; res 0 used 0; full ext 0
fragm pages 0; free extents 0; not full extents 0: pages 0
SEGMENT id 7 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 8 space 0; page 2; res 0 used 0; full ext 0
fragm pages 0; free extents 0; not full extents 0: pages 0
SEGMENT id 9 space 0; page 2; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 10 space 0; page 2; res 0 used 0; full ext 0
fragm pages 0; free extents 0; not full extents 0: pages 0
SEGMENT id 11 space 0; page 2; res 1 used 1; full ext 0
...
SEGMENT id 166 space 0; page 243; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 167 space 0; page 243; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
SEGMENT id 170 space 0; page 243; res 1 used 1; full ext 0
fragm pages 1; free extents 0; not full extents 0: pages 0
NUMBER of file segments: 407
Validating tablespace
Validation ok
---------------------------------------
END OF INNODB TABLESPACE MONITOR OUTPUT
=======================================

I also wonder access to what exact table(s) do some kind iof validation of shared tablespace?

How to repeat:
mysql> create table innodb_tablespace_monitor(c1 int) engine=InnoDB;
Query OK, 0 rows affected, 1 warning (3.19 sec)

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Warning
   Code: 131
Message: Using the table name innodb_tablespace_monitor to enable diagnostic out
put is deprecated and may be removed in future releases. Use INFORMATION_SCHEMA
or PERFORMANCE_SCHEMA tables or SET GLOBAL innodb_status_output=ON.
1 row in set (0.04 sec)

mysql> select sleep(20);
+-----------+
| sleep(20) |
+-----------+
|         0 |
+-----------+
1 row in set (20.13 sec)

mysql> drop table innodb_tablespace_monitor;
Query OK, 0 rows affected (0.56 sec)

Now, check content of the error log (monitor output) and try to find out in the manual what exact tables should be accessed to get the same details.

Personally I was not able to find any INFORMATION_SCHEMA t5able that provides any details about individual segments in shared InnoDB tablespace and extents they are composed of. 

As for performance_schema, these kind of data has nothing to do with performance directly, so there is no reason to put them there.

Suggested fix:
While deprecation note makes sense if there are plans to remove this feature, false statements about the same information already available elsewhere make no sense. 

Please, fix these misleading notes until server will really provide any other way to get the information now available via InnoDB Tablespace Monitor.

Alternatively, add table(s) like INNODB_SYS_SEGMENTS and INNODB_SYS_EXTENTS to INFORMATION_SCHEMA and document them properly.
[10 Mar 2014 15:34] MySQL Verification Team
Thank you for the bug report.
[11 Mar 2014 12:43] Daniel Price
Posted by developer:
 
Thank you for the bug report. The inaccurate reference in the documentation has been revised.
[11 Mar 2014 13:07] Daniel Price
The revised documentation will appear soon, with the next published documentation build.