Bug #8729 rename table fails on temporary table
Submitted: 23 Feb 2005 14:49 Modified: 12 Jan 2006 21:19
Reporter: Martin Friebe (Gold Quality Contributor) (SCA)
Status: Won't fix
Category:Server: DDL Severity:S3 (Non-critical)
Version:4.1.10 OS:Any (*)
Assigned to: Ingo Strüwing Target Version:
Tags: qc
Triage: D3 (Medium)

[23 Feb 2005 14:49] Martin Friebe
Description:
rename table does have a lazy way of checking the existince of a table.

 rename table i_dont_exist to some_other_name;
 ERROR 1017 (HY000): Can't find file: './xxx/i_dont_exist.frm' (errno: 2)

instead of the proper error: table does not exist

rename on a temporary table

 rename table tmp1 to tmp2;
 ERROR 1017 (HY000): Can't find file: './xxx/tmp1.frm' (errno: 2)

How to repeat:
# example 1
rename table i_dont_exist to some_other_name;

# example2
create temporary table tmp1 (a int) select 2 a;
rename table tmp1 to tmp2;

drop table tmp1;

Suggested fix:
-