1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-12 12:25:37 +03:00

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
This commit is contained in:
unknown
2004-09-07 11:55:34 +05:00
parent 3c3db07321
commit 89ee639541
5 changed files with 31 additions and 14 deletions

View File

@@ -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);