Commit 96f64b44 authored by unknown's avatar unknown

Fixed new bug that caused symlink test to fail


mysys/my_symlink.c:
  More debugging
parent 8f04aaae
...@@ -142,7 +142,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) ...@@ -142,7 +142,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
goto err; goto err;
} }
/* Don't call realpath() if the name can't be a link */ /* Don't call realpath() if the name can't be a link */
if (strcmp(name_buff, org_name) || if (!strcmp(name_buff, org_name) ||
my_readlink(index_name, org_name, MYF(0)) == -1) my_readlink(index_name, org_name, MYF(0)) == -1)
(void) strmov(index_name, org_name); (void) strmov(index_name, org_name);
(void) fn_format(data_name,org_name,"",MI_NAME_DEXT,2+4+16); (void) fn_format(data_name,org_name,"",MI_NAME_DEXT,2+4+16);
......
...@@ -26,8 +26,10 @@ ...@@ -26,8 +26,10 @@
/* /*
Reads the content of a symbolic link Reads the content of a symbolic link
If the file is not a symbolic link, return the original file name in to. If the file is not a symbolic link, return the original file name in to.
Returns: 0 if table was a symlink,
1 if table was a normal file RETURN
0 If filename was a symlink, (to will be set to value of symlink)
1 If filename was a normal file (to will be set to filename)
-1 on error. -1 on error.
*/ */
...@@ -58,6 +60,7 @@ int my_readlink(char *to, const char *filename, myf MyFlags) ...@@ -58,6 +60,7 @@ int my_readlink(char *to, const char *filename, myf MyFlags)
} }
else else
to[length]=0; to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result); DBUG_RETURN(result);
#endif /* HAVE_READLINK */ #endif /* HAVE_READLINK */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment