1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
hf@deer.(none)
2004-09-14 10:04:35 +05:00
5 changed files with 29 additions and 15 deletions

View File

@ -892,9 +892,14 @@ 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 : "",
NullS);
(void) fn_format(path, exchange->file_name, path, "", option);
if (!dirname_length(exchange->file_name))
{
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);