diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-03-15 11:46:54 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-03-15 17:48:30 +0100 |
commit | 2c2bd8c1556b081fccd0fc3e010dc3ea2c38fffb (patch) | |
tree | a43c7e2f6fdec4910f6c06e00be4f41d17fd1a13 /mysys/my_symlink2.c | |
parent | 06f1f1aa6e3dbc1efcd623378fe415b27c32b944 (diff) | |
download | mariadb-git-2c2bd8c1556b081fccd0fc3e010dc3ea2c38fffb.tar.gz |
MDEV-12261 build failure without P_S
restore mysql_file_delete_with_symlink() but let it use
new my_handler_delete_with_symlink() mysys helper.
Diffstat (limited to 'mysys/my_symlink2.c')
-rw-r--r-- | mysys/my_symlink2.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c index defcb5962d8..c851468ce1b 100644 --- a/mysys/my_symlink2.c +++ b/mysys/my_symlink2.c @@ -170,22 +170,20 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags) in this case both the symlink and the symlinked file are deleted, but only if the symlinked file is not in the datadir. */ -int my_handler_delete_with_symlink(PSI_file_key key, const char *name, - const char *ext, myf sync_dir) +int my_handler_delete_with_symlink(const char *filename, myf sync_dir) { - char orig[FN_REFLEN], real[FN_REFLEN]; + char real[FN_REFLEN]; int res= 0; DBUG_ENTER("my_handler_delete_with_symlink"); - fn_format(orig, name, "", ext, MY_UNPACK_FILENAME | MY_APPEND_EXT); - if (my_is_symlink(orig)) + if (my_is_symlink(filename)) { /* Delete the symlinked file only if the symlink is not pointing into datadir. */ - if (!(my_realpath(real, orig, MYF(0)) || mysys_test_invalid_symlink(real))) - res= mysql_file_delete(key, real, MYF(MY_NOSYMLINKS | sync_dir)); + if (!(my_realpath(real, filename, MYF(0)) || mysys_test_invalid_symlink(real))) + res= my_delete(real, MYF(MY_NOSYMLINKS | sync_dir)); } - DBUG_RETURN(mysql_file_delete(key, orig, MYF(sync_dir)) || res); + DBUG_RETURN(my_delete(filename, MYF(sync_dir)) || res); } |