pingcap / pingcap/tidb

[Enhancement] Show temp table info in `infomation_schema.tables`

Open
#41,686 3 comments 0 reactions 1 assignee Claimed by @aynp View on GitHub
good first issue help wanted type/compatibility type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

TiDB supports the 'local temporary table'(compatible with MySQL) and 'global temporary table'(from ANSI SQL standard). However, there is no temporary table information in `information_schema.tables`, it's not very easy to manage them.

So we would like to add both local temporary and global temporary tables in `information_schema.tables`. For `TABLE_TYPE` column, we show `LOCAL TEMPORARY` for a local temporary table, `GLOBAL TEMPORARY` for a global temporary table

Note: this is not compatible with MySQL.

- MySQL only supports local temporary table, and they do not show local temporary table in information_schema.tables. Instead, it provides [`information_schema.INNODB_TEMP_TABLE_INFO`](https://dev.mysql.com/doc/refman/8.0/en/innodb-information-schema-temp-table-info.html).
- We think it is fine because we follow the SQL standard.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.