22 int mi_rename(
const char *old_name,
const char *new_name)
24 char from[FN_REFLEN],
to[FN_REFLEN];
25 DBUG_ENTER(
"mi_rename");
28 check_table_is_closed(old_name,
"rename old_table");
29 check_table_is_closed(new_name,
"rename new table2");
32 fn_format(from,old_name,
"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
33 fn_format(to,new_name,
"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
35 DBUG_RETURN(my_errno);
36 fn_format(from,old_name,
"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
37 fn_format(to,new_name,
"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
40 MYF(MY_WME)) ? my_errno : 0);