diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-02-18 10:10:34 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-02-27 12:35:10 +0100 |
commit | c826ac9d539fa66d45afd0ca0d54b2579fcbb797 (patch) | |
tree | e84f7e2fd5ac57ca525f07e5c19155667a3fe648 /storage/maria | |
parent | 24d8bc707a3d3161229b1cfc94b34dc50473bc59 (diff) | |
download | mariadb-git-c826ac9d539fa66d45afd0ca0d54b2579fcbb797.tar.gz |
cleanup: mysys_test_invalid_symlink
Remove maria_test_invalid_symlink() and myisam_test_invalid_symlink(),
introduce mysys_test_invalid_symlink(). Other engines might need it too
Diffstat (limited to 'storage/maria')
-rw-r--r-- | storage/maria/ha_maria.cc | 4 | ||||
-rw-r--r-- | storage/maria/ma_open.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_static.c | 6 |
3 files changed, 2 insertions, 12 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 38ee0758611..60e3f62096d 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -3572,10 +3572,6 @@ static int ha_maria_init(void *p) maria_pagecache->extra_debug= 1; maria_assert_if_crashed_table= debug_assert_if_crashed_table; -#if defined(HAVE_REALPATH) && !defined(HAVE_valgrind) && !defined(HAVE_BROKEN_REALPATH) - /* We can only test for sub paths if my_symlink.c is using realpath */ - maria_test_invalid_symlink= test_if_data_home_dir; -#endif if (res) maria_hton= 0; diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index f8f90812e51..83d37a17483 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -288,7 +288,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags) MARIA_NAME_IEXT, MY_UNPACK_FILENAME),MYF(0)); if (my_is_symlink(org_name) && - (realpath_err || (*maria_test_invalid_symlink)(name_buff))) + (realpath_err || mysys_test_invalid_symlink(name_buff))) { my_errno= HA_WRONG_CREATE_OPTION; DBUG_RETURN(0); @@ -1880,7 +1880,7 @@ int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share, const char *org_name, if (my_is_symlink(real_data_name)) { if (my_realpath(real_data_name, real_data_name, MYF(0)) || - (*maria_test_invalid_symlink)(real_data_name)) + mysys_test_invalid_symlink(real_data_name)) { my_errno= HA_WRONG_CREATE_OPTION; return 1; diff --git a/storage/maria/ma_static.c b/storage/maria/ma_static.c index a075459d389..3b6115e8a37 100644 --- a/storage/maria/ma_static.c +++ b/storage/maria/ma_static.c @@ -106,12 +106,6 @@ uint32 maria_readnext_vec[]= SEARCH_BIGGER, SEARCH_SMALLER, SEARCH_SMALLER }; -static int always_valid(const char *filename __attribute__((unused))) -{ - return 0; -} - -int (*maria_test_invalid_symlink)(const char *filename)= always_valid; my_bool (*ma_killed)(MARIA_HA *)= ma_killed_standalone; #ifdef HAVE_PSI_INTERFACE |