sys Schema Stored Functions mysql>  CALL sys.table_exists(’db1’, ’t2’, @exists); SELECT @exists; Query OK, 0 rows affected (0.02 sec) +------------+ | @exists | +------------+ | BASE TABLE | +------------+ 1 row in set (0.00 sec) mysql>  CALL sys.table_exists(’db1’, ’v_t1’, @exists); SELECT @exists; Query OK, 0 rows affected (0.02 sec) +---------+ | @exists | +---------+ | VIEW | +---------+ 1 row in set (0.00 sec) mysql>  CALL sys.table_exists(’db1’, ’t3’, @exists); SELECT @exists; Query OK, 0 rows affected (0.00 sec) +---------+ | @exists | +---------+ | | +---------+ 1 row in set (0.00 sec) mysql>  SELECT sys.extract_schema_from_file_name(’/usr/local/mysql/data/world/City.ibd’); +---------------------------------------------------------------------------+ | sys.extract_schema_from_file_name(’/usr/local/mysql/data/world/City.ibd’) | +---------------------------------------------------------------------------+ | world | +---------------------------------------------------------------------------+ 5202 28.4.5.2 The extract_table_from_file_name() Function Example Return Value Parameters 28.4.5 sys Schema Stored Functions 28.4.5.1 The extract_schema_from_file_name() Function The following sections describe  sys  schema stored functions. Given a file path name, returns the path component that represents the schema name. This function assumes that the file name lies within the schema directory. For this reason, it does not work with partitions or tables defined using their own  DATA_DIRECTORY  table option. 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 schema names, which can be more easily understood than full path names, and can be used in joins against object schema names. A  VARCHAR(64)  value. • path VARCHAR(512) : The full path to a data file from which to extract the schema name.