summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-09-07 11:55:34 +0500
committerunknown <hf@deer.(none)>2004-09-07 11:55:34 +0500
commitfc10f15a277b4130d32b1d311d7c097955381824 (patch)
treee7c329902080841ee5657b450f9c954f44bb920a /sql/sql_class.cc
parentffb38878b1630de4978aa6d415fcfaafa2f2b445 (diff)
downloadmariadb-git-fc10f15a277b4130d32b1d311d7c097955381824.tar.gz
A set of mysql_home_path-related fixes
mysys/mf_format.c: I think here i fixed a bug sql/item_strfunc.cc: mysql_real_data_home added sql/sql_class.cc: it's more closer to what manual says sql/sql_load.cc: code rewritten to be similar sql/sql_table.cc: mysql_real_data_home added to the path
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 36b1b89f6bf..69a543d9863 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -891,8 +891,15 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
option|= MY_REPLACE_DIR; // Force use of db directory
#endif
- strxnmov(path, FN_REFLEN, mysql_real_data_home, thd->db ? thd->db : "");
- (void) fn_format(path, exchange->file_name, path, "", option);
+ if (!dirname_length(path))
+ {
+ strxnmov(path, FN_REFLEN, mysql_real_data_home, thd->db ? thd->db : "", NullS);
+ (void) fn_format(path, exchange->file_name, path, "", option);
+ }
+ else
+ (void) fn_format(path, exchange->file_name, mysql_real_data_home, "", option);
+
+
if (!access(path, F_OK))
{
my_error(ER_FILE_EXISTS_ERROR, MYF(0), exchange->file_name);