[MDEV-20802] System tablespace is not listed in information_schema.INNODB_SYS_TABLESPACES Created: 2019-10-10  Updated: 2020-11-12  Resolved: 2020-11-12

Status: Closed
Project: MariaDB Server
Component/s: Information Schema, Storage Engine - InnoDB
Affects Version/s: 10.2.27, 10.3.18, 10.4.8
Fix Version/s: 10.6.0

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-21801 Upstream bug #71725: after upgrading ... Closed
relates to MDEV-21933 INFORMATION_SCHEMA.INNODB_SYS_TABLESP... Closed
relates to MDEV-22343 Remove SYS_TABLESPACES and SYS_DATAFILES Closed
relates to MDEV-11655 Transactional data dictionary Open

 Description   

The system tablespace is not listed in information_schema.INNODB_SYS_TABLESPACES. For example:

MariaDB [(none)]> SELECT * FROM information_schema.INNODB_SYS_TABLESPACES WHERE SPACE=0\G
Empty set (0.000 sec)

I'm not sure if this omission is intentional, or if it's a bug.

Of course, any tables within the system tablespace are listed in information_schema.INNODB_SYS_TABLES. For example:

MariaDB [(none)]> SELECT * FROM information_schema.INNODB_SYS_TABLES WHERE SPACE=0\G
*************************** 1. row ***************************
     TABLE_ID: 14
         NAME: SYS_DATAFILES
         FLAG: 0
       N_COLS: 5
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 2. row ***************************
     TABLE_ID: 11
         NAME: SYS_FOREIGN
         FLAG: 0
       N_COLS: 7
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 3. row ***************************
     TABLE_ID: 12
         NAME: SYS_FOREIGN_COLS
         FLAG: 0
       N_COLS: 7
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 4. row ***************************
     TABLE_ID: 13
         NAME: SYS_TABLESPACES
         FLAG: 0
       N_COLS: 6
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 5. row ***************************
     TABLE_ID: 996
         NAME: SYS_VIRTUAL
         FLAG: 0
       N_COLS: 6
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 6. row ***************************
     TABLE_ID: 810
         NAME: SYS_ZIP_DICT
         FLAG: 0
       N_COLS: 6
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
*************************** 7. row ***************************
     TABLE_ID: 811
         NAME: SYS_ZIP_DICT_COLS
         FLAG: 0
       N_COLS: 6
        SPACE: 0
   ROW_FORMAT: Redundant
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: System
7 rows in set (0.000 sec)

I know that both of these tables might go away when/if we implement MDEV-11655.



 Comments   
Comment by Marko Mäkelä [ 2020-11-12 ]

MDEV-22343 in MariaDB Server 10.6.0 removes the system tables SYS_TABLESPACES and SYS_DATAFILES altogether and makes INNODB_SYS_TABLESPACES reflect the fil_system data structure. The output does include the system tablespace.

Generated at Thu Feb 08 09:02:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.