diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 20:12:48 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 20:12:48 +0200 |
commit | 606a4a48475c95480751755e811e0b6c76ce1c3e (patch) | |
tree | 0fdd33aed4a00ec7e5825e881f59667373873eca /mysys/my_symlink.c | |
parent | 1acfa942edb72fedcf92dd017ae5fef8694382e5 (diff) | |
download | mariadb-git-606a4a48475c95480751755e811e0b6c76ce1c3e.tar.gz |
Post MDEV-11902 Fix test failures in maria and myisam storage engines
my_readline can fail due to missing file. Make my_readline report this
condition separately so that we can catch it and report an appropriate
error message to the user.
Diffstat (limited to 'mysys/my_symlink.c')
-rw-r--r-- | mysys/my_symlink.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index ed35fff41e9..72648d4c9a8 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -129,6 +129,11 @@ int my_is_symlink(const char *filename __attribute__((unused))) to is guaranteed to never set to a string longer than FN_REFLEN (including the end \0) + + On error returns -1, unless error is file not found, in which case it + is 1. + + Sets my_errno to specific error number. */ int my_realpath(char *to, const char *filename, myf MyFlags) @@ -154,7 +159,10 @@ int my_realpath(char *to, const char *filename, myf MyFlags) if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); - result= -1; + if (my_errno == ENOENT) + result= 1; + else + result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) |