summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-09-02 11:10:26 +0500
committerhf@deer.(none) <>2004-09-02 11:10:26 +0500
commit5a817ea665af6b44e19c072e456adf7081994e09 (patch)
tree256313bf9a07c47bf3e1e2c9afa54fcdac76c6f1 /sql/sql_class.cc
parent8459cd358b0cb521308751e78d4a4ce99ff70ed5 (diff)
downloadmariadb-git-5a817ea665af6b44e19c072e456adf7081994e09.tar.gz
Addition to the fix for #4815
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 80b9d6e20bf..b6b9a316cc6 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -854,21 +854,13 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
{
File file;
uint option= MY_UNPACK_FILENAME;
- char buff[FN_REFLEN];
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
option|= MY_REPLACE_DIR; // Force use of db directory
#endif
- char *cnt= strmake(buff, mysql_real_data_home, FN_REFLEN);
- *cnt= FN_LIBCHAR;
- cnt++;
- cnt= strmake(cnt, thd->db ? thd->db : "", FN_REFLEN - (cnt-buff));
- *cnt= FN_LIBCHAR;
- cnt++;
- *cnt= 0;
-
- (void) fn_format(path, exchange->file_name, buff, "", option);
+ strxnmov(path, FN_REFLEN, mysql_real_data_home, thd->db ? thd->db : "");
+ (void) fn_format(path, exchange->file_name, path, "", option);
if (!access(path, F_OK))
{
my_error(ER_FILE_EXISTS_ERROR, MYF(0), exchange->file_name);