Bug #71725 innodb_sys_tablespaces and innodb_sys_datafiles not populated when upgrading to
Submitted: 14 Feb 2014 20:48 Modified: 18 Feb 2014 11:42
Reporter: Inaam Rana (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[14 Feb 2014 20:48] Inaam Rana
Description:
When upgrading from 5.5 to 5.6, innodb_sys_tablespaces and innodb_sys_datafiles don't seem to pick up the existing tables. innodb_sys_columns and innodb_sys_tables seem to work fine.

How to repeat:
I created four tables t1, t2, t3, t4 on 5.5 and then moved to 5.6 binary:

root@localhost[information_schema]mysql>use test;
Database changed
root@localhost[test]mysql>show tables;
+----------------+
| Tables_in_test |
+----------------+
| t1             |
| t2             |
| t3             |
| t4             |
+----------------+
4 rows in set (0.00 sec)

root@localhost[test]mysql>use information_schema;
Database changed
root@localhost[information_schema]mysql>select table_id, name, space from innodb_sys_tables;
+----------+------------------+-------+
| table_id | name             | space |
+----------+------------------+-------+
|       18 | SYS_DATAFILES    |     0 |
|       11 | SYS_FOREIGN      |     0 |
|       12 | SYS_FOREIGN_COLS |     0 |
|       17 | SYS_TABLESPACES  |     0 |
|       13 | test/t1          |     1 |
|       14 | test/t2          |     2 |
|       15 | test/t3          |     3 |
|       16 | test/t4          |     4 |
+----------+------------------+-------+
8 rows in set (0.00 sec)

root@localhost[information_schema]mysql>select table_id, name from innodb_sys_columns;
+----------+--------------+
| table_id | name         |
+----------+--------------+
|       11 | ID           |
|       11 | FOR_NAME     |
|       11 | REF_NAME     |
|       11 | N_COLS       |
|       12 | ID           |
|       12 | POS          |
|       12 | FOR_COL_NAME |
|       12 | REF_COL_NAME |
|       13 | id           |
|       14 | id           |
|       15 | id           |
|       16 | id           |
|       17 | SPACE        |
|       17 | NAME         |
|       17 | FLAGS        |
|       18 | SPACE        |
|       18 | PATH         |
+----------+--------------+
17 rows in set (0.01 sec)

root@localhost[information_schema]mysql>select space, name from innodb_sys_tablespaces;
Empty set (0.00 sec)

root@localhost[information_schema]mysql>select space from innodb_sys_datafiles;
Empty set (0.00 sec)

root@localhost[information_schema]mysql>
[14 Feb 2014 20:50] Inaam Rana
While we are at it, it would make sense to get system space (space_id=0) reported in innodb_sys_tablespaces and innodb_sys_datafiles
[18 Feb 2014 11:42] MySQL Verification Team
Hello Inaam,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh