summaryrefslogtreecommitdiff
path: root/sql/sql_table.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
commit89ee639541a36aef7be25855b5bdc24b890108f8 (patch)
treee7c329902080841ee5657b450f9c954f44bb920a /sql/sql_table.cc
parent3c3db07321d1a75a241e1d6689dc56d9415519a5 (diff)
downloadmariadb-git-89ee639541a36aef7be25855b5bdc24b890108f8.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_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 408f3408346..7fff338df1c 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2602,7 +2602,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
else
{
- if (!access(fn_format(new_name_buff,new_name_buff,new_db,reg_ext,0),
+ char dir_buff[FN_REFLEN];
+ strxnmov(dir_buff, FN_REFLEN, mysql_real_data_home, new_db, NullS);
+ if (!access(fn_format(new_name_buff,new_name_buff,dir_buff,reg_ext,0),
F_OK))
{
/* Table will be closed in do_command() */