Bug #35210 Can't filter Falcon Tables by TableSpaces at command-line
Submitted: 11 Mar 2008 13:00 Modified: 12 Dec 2008 10:43
Reporter: Santo Leto Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Information schema Severity:S2 (Serious)
Version:6.0.4-alpha OS:Any
Assigned to: Martin Hansson CPU Architecture:Any
Tags: falcon metadata, falcon tablespaces

[11 Mar 2008 13:00] Santo Leto
Description:
Which is the difference beetwen `information_schema`.`falcon_tables`.`table_name` and `information_schema`.`falcon_tables`.`internal_name`?
The column `information_schema`.`falcon_tables`.`internal_name` has been added in ver. 6.0.4-alpha.

mysql> select * from falcon_tables\G
*************************** 1. row ***************************
  SCHEMA_NAME: FALCON_DB
   TABLE_NAME: TABLE1
    PARTITION:
   TABLESPACE: FALCON_USER
INTERNAL_NAME: TABLE1
*************************** 2. row ***************************
  SCHEMA_NAME: FALCON_DB
   TABLE_NAME: TABLE2
    PARTITION:
   TABLESPACE: falcon_tablespace1
INTERNAL_NAME: TABLE2
*************************** 3. row ***************************
  SCHEMA_NAME: FALCON_DB
   TABLE_NAME: TABLE2@0023
    PARTITION:
   TABLESPACE: falcon_tablespace1
INTERNAL_NAME: TABLE2@0023
*************************** 4. row ***************************
  SCHEMA_NAME: FALCON_DB
   TABLE_NAME: TEST@0021TABLE
    PARTITION:
   TABLESPACE: falcon_tablespace1
INTERNAL_NAME: TEST@0021TABLE
4 rows in set (0.00 sec)

I was hoping for a new column that allows me to filter falcon tables by tablespaces in a simplier way!
Please, try answer at the following question: "Which are the falcon tables that are using a particular Tablespace?"

SELECT DISTINCT `tablespace` FROM `information_schema`.`FALCON_TABLES`;
SELECT DISTINCT `table_name`, `internal_name`, `schema_name` FROM `information_schema`.`FALCON_TABLES` WHERE `tablespace` = 'falcon_tablespace1';
SELECT DISTINCT `table_name`, `internal_name`, `schema_name` FROM `information_schema`.`FALCON_TABLES` WHERE `tablespace` = 'FALCON_USER';

mysql> SELECT DISTINCT `tablespace` FROM `information_schema`.`FALCON_TABLES`;
+--------------------+
| tablespace         |
+--------------------+
| FALCON_USER        |
| falcon_tablespace1 |
+--------------------+
2 rows in set (0.00 sec)

mysql> SELECT DISTINCT `table_name`, `internal_name`, `schema_name` FROM `inform
ation_schema`.`FALCON_TABLES` WHERE `tablespace` = 'falcon_tablespace1';
+----------------+----------------+-------------+
| table_name     | internal_name  | schema_name |
+----------------+----------------+-------------+
| TABLE2         | TABLE2         | FALCON_DB   |
| TABLE2@0023    | TABLE2@0023    | FALCON_DB   |
| TEST@0021TABLE | TEST@0021TABLE | FALCON_DB   |
+----------------+----------------+-------------+
3 rows in set (0.02 sec)

As you can easly see, I can't answer immediately using the command-line: I need to do a parsing of the column `table_name` (or `internal_name`) at software level.

The software, returns me

	table2 --> table2
	TABLE2@0023 --> table2#
	TEST@0021TABLE --> test!table

Now, it's not difficult	having such a function at software-level, but please add a new `parsed_name` column in `information_schema`.`falcon_tables` or deny the possibility to use in table names special characters that need a parsing (!,#, ...).

Thanks.

How to repeat:
See above.

Suggested fix:
See above.
[12 Mar 2008 22:15] MySQL Verification Team
Thank you for the bug report.
[12 Dec 2008 10:39] Sergei Glukhov
I_S.FALCON_TABLES table was removed and new field TABLESPACE_NAME 
was added into I_S.TABLES(WL#4545).
So you can use I_S.TABLES to find tables with particular tablespace_name.