mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
MDEV-11426 Remove InnoDB INFORMATION_SCHEMA.FILES implementation
MySQL 5.7 introduced WL#7943: InnoDB: Implement Information_Schema.Files to provide a long-term alternative for accessing tablespace metadata. The INFORMATION_SCHEMA.INNODB_* views are considered internal interfaces that are subject to change or removal between releases. So, users should refer to I_S.FILES instead of I_S.INNODB_SYS_TABLESPACES to fetch metadata about CREATE TABLESPACE. Because MariaDB 10.2 does not support CREATE TABLESPACE or CREATE TABLE…TABLESPACE for InnoDB, it does not make sense to support I_S.FILES either. So, let MariaDB 10.2 omit the code that was added in MySQL 5.7. After this change, I_S.FILES will report the empty result, unless some other storage engine in MariaDB 10.2 implements the interface. (The I_S.FILES interface was originally created for the NDB Cluster.)
This commit is contained in:
20
mysql-test/suite/innodb/include/show_i_s_tables.inc
Normal file
20
mysql-test/suite/innodb/include/show_i_s_tables.inc
Normal file
@@ -0,0 +1,20 @@
|
||||
--echo === information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
|
||||
--disable_query_log
|
||||
--replace_result #P# #p# #SP# #sp#
|
||||
--replace_regex /FTS_([0-9a-f_]+)([A-Z0-9_]+)/FTS_AUX_\2/
|
||||
|
||||
SELECT t.name 'Table Name',
|
||||
s.name 'Tablespace',
|
||||
t.flag 'Table Flags',
|
||||
t.n_cols 'Columns',
|
||||
t.row_format 'Row Format',
|
||||
t.zip_page_size 'Zip Size',
|
||||
t.space_type 'Space Type'
|
||||
FROM information_schema.innodb_sys_tables t LEFT JOIN
|
||||
information_schema.innodb_sys_tablespaces s
|
||||
ON t.space = s.space
|
||||
WHERE t.name not like 'SYS_%'
|
||||
AND t.name NOT LIKE 'mysql/%'
|
||||
AND t.name NOT LIKE 'sys/%'
|
||||
ORDER BY t.name;
|
||||
--enable_query_log
|
@@ -17,22 +17,4 @@ SELECT s.name 'Space_Name',
|
||||
AND s.name NOT LIKE 'mysql/%'
|
||||
AND s.name NOT LIKE 'sys/%'
|
||||
ORDER BY s.space;
|
||||
|
||||
# This SELECT will not show UNDO or TEMPORARY tablespaces since
|
||||
# they are only in FILES, not SYS_TABLESPACES.
|
||||
--echo === information_schema.files ===
|
||||
--replace_regex /innodb_file_per_table.[0-9]+/innodb_file_per_table.##/ /#P#/#p#/ /#SP#/#sp#/
|
||||
--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR/ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR/ $MYSQL_TMP_DIR MYSQL_TMP_DIR $INNODB_PAGE_SIZE DEFAULT
|
||||
SELECT s.name 'Space_Name',
|
||||
f.file_type 'File_Type',
|
||||
f.engine 'Engine',
|
||||
f.status 'Status',
|
||||
f.tablespace_name 'Tablespace_Name',
|
||||
f.file_name 'Path'
|
||||
FROM information_schema.files f,
|
||||
information_schema.innodb_sys_tablespaces s
|
||||
WHERE f.file_id = s.space
|
||||
AND s.name NOT LIKE 'mysql/%'
|
||||
AND s.name NOT LIKE 'sys/%'
|
||||
ORDER BY f.file_id;
|
||||
--enable_query_log
|
||||
|
Reference in New Issue
Block a user