diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-30 22:52:54 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-30 22:52:54 +0200 |
commit | fe3cbcdffa6d419bcc3658fb6dda9ea371b19d35 (patch) | |
tree | 350473c8efff19ee2c6edc266a454b78c43558e1 /storage/connect/osutil.c | |
parent | 5c5834b09123f46b2807dcf76872846a2185bf8a (diff) | |
download | mariadb-git-fe3cbcdffa6d419bcc3658fb6dda9ea371b19d35.tar.gz |
- Add system variables type_conv and conv_size. This addresses the eventual
conversion from TEXT to VARCHAR in PROXY and MYSQL tables.
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/myutil.cpp
storage/connect/tabmysql.cpp
storage/connect/tabutil.cpp
- Add the xmap system variable addressing whether file mapping should be used
to handle indexing.
modified:
storage/connect/CMakeLists.txt
storage/connect/ha_connect.cc
storage/connect/xindex.cpp
storage/connect/xindex.h
- Do take care of ~ in Linux version of _fullpath (not tested yet)
modified:
storage/connect/osutil.c
Diffstat (limited to 'storage/connect/osutil.c')
-rw-r--r-- | storage/connect/osutil.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/connect/osutil.c b/storage/connect/osutil.c index af5faa5b13b..32debe02107 100644 --- a/storage/connect/osutil.c +++ b/storage/connect/osutil.c @@ -16,6 +16,7 @@ my_bool CloseFileHandle(HANDLE h) #include <sys/stat.h> #include <ctype.h> #include <fcntl.h> +#include <pwd.h> extern FILE *debug; @@ -176,8 +177,10 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength) strncpy(absPath, relPath, maxLength); } else if(*relPath == '~') { // get the path to the home directory - // Fixme - strncpy(absPath, relPath, maxLength); + struct passwd *pw = getpwuid_r(getuid()); + const char *homedir = pw->pw_dir; + + strcat(strcat(strncpy(absPath, homedir, maxLength), "/"), relPath); } else { char buff[2*_MAX_PATH]; |