mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #6607 Create table... LIKE... with Windows Symlinks
sql_table.cc: use fn_format to resolve symlinks in mysql_create_like_table sql/sql_table.cc: use fn_format to resolve symlinks in mysql_create_like_table
This commit is contained in:
@ -2272,8 +2272,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
|||||||
strxmov(src_path, (*tmp_table)->path, reg_ext, NullS);
|
strxmov(src_path, (*tmp_table)->path, reg_ext, NullS);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strxmov(src_path, mysql_data_home, "/", src_db, "/", src_table,
|
fn_format( src_path, src_table, src_db, reg_ext, MYF(MY_UNPACK_FILENAME));
|
||||||
reg_ext, NullS);
|
|
||||||
if (access(src_path, F_OK))
|
if (access(src_path, F_OK))
|
||||||
{
|
{
|
||||||
my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table);
|
my_error(ER_BAD_TABLE_ERROR, MYF(0), src_table);
|
||||||
@ -2300,8 +2299,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strxmov(dst_path, mysql_data_home, "/", db, "/", table_name,
|
fn_format( dst_path, table_name, db, reg_ext, MYF(MY_UNPACK_FILENAME));
|
||||||
reg_ext, NullS);
|
|
||||||
if (!access(dst_path, F_OK))
|
if (!access(dst_path, F_OK))
|
||||||
goto table_exists;
|
goto table_exists;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user