WL#4545: Add TABLESPACE_NAME field to I_S.TABLES
Affects: Server-6.0 — Status: Complete — Priority: Medium
After I_S.FALCON_TABLES was removed, the only way to determine tablespace that table uses is `SHOW CREATE TABLE`. There should be a way to retrieve this information via INFORMATION_SCHEMA.TABLES. Required at least for backup (see WL#4264).
Add a new field to INFORMATION_SCHEMA.TABLES with the following definition: `TABLESPACE_NAME` varchar(64) DEFAULT NULL TABLESPACE_NAME field should be added before `TABLE_COMMENT` field. When querying I_S.TABLES, return tablespace name if table has this option. If a table is not bound to a specific tablespace, return NULL.
In sql_show.cc: - add `TABLESPACE_NAME` to tables_fields_info array; - modify get_schema_tables_record(), so it stores tablespace name to that field; - fix indexes, so `TABLE_COMMENT` is stored properly; - we do not need to open a table to determine tablespace name - we can get it from .frm.
Copyright (c) 2000, 2016, Oracle Corporation and/or its affiliates. All rights reserved.