[MDEV-21933] INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES accesses SYS_DATAFILES Created: 2020-03-13  Updated: 2020-03-31  Resolved: 2020-03-13

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.2, 10.3.0, 10.4.0, 10.5.0
Fix Version/s: 10.2.32, 10.3.23, 10.4.13, 10.5.2

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: upstream

Issue Links:
Relates
relates to MDEV-20802 System tablespace is not listed in in... Closed

 Description   

The function i_s_sys_tablespaces_fill_table() is accessing the SYS_DATAFILES table by invoking dict_get_first_path().

All tablespace metadata is buffered in fil_system. There is a LRU mechanism, but that only controls the opening and closing of fil_node_t::handle.

It is much more efficient and less error-prone to access data file names by looking up the fil_space_t object rather than by essentially joining each row with an access to SYS_DATAFILES via the InnoDB internal SQL parser.

As noted in MDEV-20802, ultimately I would like to remove the tables SYS_TABLESPACES and SYS_DATAFILES, because I do not think that they are serving any useful purpose.


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