diff options
author | monty@mashka.mysql.fi <> | 2003-07-01 15:49:32 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-07-01 15:49:32 +0300 |
commit | a6755acb4ec4f10c1aa8915d779a139b59d3007b (patch) | |
tree | bae354dc2e20ca3c0b40b1b4c4625e5c52d4ea00 /mysys | |
parent | 6bc7b3a6be246f67b06c1e5e15ea0de97bf637f4 (diff) | |
download | mariadb-git-a6755acb4ec4f10c1aa8915d779a139b59d3007b.tar.gz |
Fix needed to support MERGE tables in different databases
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_loadpath.c | 6 | ||||
-rw-r--r-- | mysys/my_symlink.c | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/mysys/mf_loadpath.c b/mysys/mf_loadpath.c index 291ad62e297..2c90d9f90a6 100644 --- a/mysys/mf_loadpath.c +++ b/mysys/mf_loadpath.c @@ -39,10 +39,10 @@ my_string my_load_path(my_string to, const char *path, (is_prefix((gptr) path,FN_PARENTDIR)) || ! own_path_prefix) { - if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)),MYF(0))) - VOID(strcat(buff,path)); + if (! my_getwd(buff,(uint) (FN_REFLEN+2-strlen(path)),MYF(0))) + VOID(strcat(buff,path+2)); else - VOID(strmov(buff,path)); + VOID(strmov(buff,path)); /* Return org file name */ } else VOID(strxmov(buff,own_path_prefix,path,NullS)); diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index abef0096e28..b9468d42cfc 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -123,20 +123,22 @@ int my_realpath(char *to, const char *filename, } else { - /* Realpath didn't work; Use original name */ + /* + Realpath didn't work; Use my_load_path() which is a poor substitute + original name but will at least be able to resolve paths that starts + with '.'. + */ DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); - if (to != filename) - strmov(to,filename); + my_load_path(to, filename, NullS); result= -1; } } DBUG_RETURN(result); #else - if (to != filename) - strmov(to,filename); + my_load_path(to, filename, NullS); return 0; #endif } |