MySQL 9.0 Release Notes
Given a file path name, returns the path component that represents the table name.
This function is useful when extracting file I/O information from the Performance Schema that includes file path names. It provides a convenient way to display table names, which can be more easily understood than full path names, and can be used in joins against object table names.
Press CTRL+C to copymysql> SELECT sys.extract_table_from_file_name('/usr/local/mysql/data/world/City.ibd'); +--------------------------------------------------------------------------+ | sys.extract_table_from_file_name('/usr/local/mysql/data/world/City.ibd') | +--------------------------------------------------------------------------+ | City | +--------------------------------------------------------------------------+