This function extracts and returns the table name from a given file path, determined solely by parsing the path string.
sys.extract_table_from_file_name(path)extract_table_from_file_name is a available with the .
Given a file path, it returns the table name.
The function does not examine anything on disk. The return value, a VARCHAR(64), is determined solely from the provided path.
This page is licensed: CC BY-SA / Gnu FDL
SELECT sys.extract_table_from_file_name('/usr/local/mysql/data/db/t1.ibd');
+---------------------------------------------------------------------+
| sys.extract_table_from_file_name('/usr/local/mysql/data/db/t1.ibd') |
+---------------------------------------------------------------------+
| t1 |
+---------------------------------------------------------------------+