12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
20
#include "myisamdef.h"
20
#include "myisam_priv.h"
22
using namespace drizzled;
22
24
int mi_rename(const char *old_name, const char *new_name)
24
26
char from[FN_REFLEN],to[FN_REFLEN];
26
fn_format(from,old_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
27
fn_format(to,new_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
28
if (my_rename_with_symlink(from, to, MYF(MY_WME)))
30
fn_format(from,old_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
31
fn_format(to,new_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
32
return(my_rename_with_symlink(from, to,MYF(MY_WME)) ? my_errno : 0);
28
internal::fn_format(from,old_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
29
internal::fn_format(to,new_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
30
if (internal::my_rename_with_symlink(from, to, MYF(MY_WME)))
32
internal::fn_format(from,old_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
33
internal::fn_format(to,new_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
34
return(internal::my_rename_with_symlink(from, to,MYF(MY_WME)) ? errno : 0);