Bug #8729 rename table fails on temporary table

Submitted: 23 Feb 2005 13:49 Modified: 12 Jan 2006 20:19
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:4.1.10 OS:Any (*)
Assigned to: Ingo Strüwing CPU Architecture:Any
Tags: qc

[23 Feb 2005 13: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:
-
[22 Dec 2009 6:49] Sveta Smirnova
See also bug #1154

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.