[MDEV-31924] SHOW CREATE TABLE should not be usable for hidden I_S tables Created: 2023-08-15  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Information Schema
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0

Type: Bug Priority: Major
Reporter: Ralf Gebhardt Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

SHOW CREATE TABLE should not be usable for hidden I_S tables.

In sql_show.cc, some I_S tables are defined as hidden in ST_SCHEMA_TABLE schema_tables[]:

They are not shown with SHOW TABLES

MariaDB [information_schema]> show tables like "OPEN_TABLES";
Empty set (0.001 sec)

But you can use SHOW CREATE TABLE

MariaDB [information_schema]> show create table OPEN_TABLES\G
*************************** 1. row ***************************
       Table: OPEN_TABLES
Create Table: CREATE TEMPORARY TABLE `OPEN_TABLES` (
  `Database` varchar(64) NOT NULL,
  `Table` varchar(64) NOT NULL,
  `In_use` bigint(1) NOT NULL,
  `Name_locked` bigint(4) NOT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
1 row in set (0.001 sec)

Only tried with 10.6.14 and 11.2.0 (preview)


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