mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Fixed new bug that caused symlink test to fail
This commit is contained in:
parent
fd3d976f64
commit
e5b788146a
2 changed files with 7 additions and 4 deletions
|
@ -142,7 +142,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
|
|||
goto err;
|
||||
}
|
||||
/* 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)
|
||||
(void) strmov(index_name, org_name);
|
||||
(void) fn_format(data_name,org_name,"",MI_NAME_DEXT,2+4+16);
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
/*
|
||||
Reads the content of a symbolic link
|
||||
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
|
||||
-1 on error.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
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
|
||||
to[length]=0;
|
||||
DBUG_PRINT("exit" ,("result: %d", result));
|
||||
DBUG_RETURN(result);
|
||||
#endif /* HAVE_READLINK */
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue