summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sysschema/t/fn_format_path.test
blob: 24f78f766f0ccbeeac85596c99a75603d03b5736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- source include/not_embedded.inc
-- source include/not_windows.inc


# Passing NULL should return NULL
SELECT sys.format_path(NULL);
# Ensure datadir is recognized and stripped
SET @mypath := CONCAT(@@global.datadir, 'foo/bar.foo');

SELECT sys.format_path(@mypath);

# Ensure tmpdir is recognized and stripped
SET @mypath := CONCAT(@@global.tmpdir, '/foo/bar.foo');
SELECT sys.format_path(@mypath);

# Unrecognized paths should return the full path
SELECT sys.format_path('/foo/bar/baz.foo');