format_path
Syntax
sys.format_path(path)
Description
format_path
is a stored function available with the Sys Schema that, given a path, returns a modified path after replacing subpaths matching the values of various system variables with the variable name.
The system variables that are matched are, in order:
- datadir
- tmpdir
- slave_load_tmpdir
- innodb_data_home_dir
- innodb_log_group_home_dir
- innodb_undo_directory
- basedir
Examples
SELECT @@tmpdir; +------------------------------------+ | @@tmpdir | +------------------------------------+ | /home/ian/sandboxes/msb_10_8_2/tmp | +------------------------------------+ SELECT sys.format_path('/home/ian/sandboxes/msb_10_8_2/tmp/testdb.ibd'); +------------------------------------------------------------------+ | sys.format_path('/home/ian/sandboxes/msb_10_8_2/tmp/testdb.ibd') | +------------------------------------------------------------------+ | @@tmpdir/testdb.ibd | +------------------------------------------------------------------+
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.