extract_table_from_file_name


Description

Description

Takes a raw file path, and extracts the table name from it.

Useful for when interacting with Performance Schema data concerning IO statistics, for example.

Parameters

path (VARCHAR(512)): The full file path to a data file to extract the table name from.

Returns

VARCHAR(64)

Example

mysql> SELECT sys.extract_table_from_file_name(‘/var/lib/mysql/employees/employee.ibd’); +—————————————————————————+ | sys.extract_table_from_file_name(‘/var/lib/mysql/employees/employee.ibd’) | +—————————————————————————+ | employee | +—————————————————————————+ 1 row in set (0.02 sec)

Parameters

Name Type Mode
path varchar(512) IN

Definition