Bug #1154 cannot rename temporary table

Submitted: 27 Aug 2003 13:37 Modified: 4 Aug 2005 2:58
Reporter: Michael Wright Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:4.0.14-standard OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[27 Aug 2003 13:37] Michael Wright
Description:
Temporary tables cannot be renamed, for example:

> mysql> create temporary table t (i int);
> Query OK, 0 rows affected (0.12 sec)
> 
> mysql> rename table t to t2;
> ERROR 1017: Can't find file: './dBlogVision/t.frm' (errno: 2)

Compared to non temporary tables being renamed...

> mysql> create table t (i int);
> Query OK, 0 rows affected (0.20 sec)
> 
> mysql> rename table t to t2;
> Query OK, 0 rows affected (0.01 sec)

How to repeat:
Attempt to rename a temporary table.

Suggested fix:
Make the rename routines temporary table aware.
[28 Aug 2003 9:46] Indrek Siitan
Yes, RENAME TABLE does not support temporary tables yet.
[30 Sep 2008 22:13] Konstantin Osipov
Workaround:
use ALTER TABLE ... RENAME
[22 Dec 2009 6:50] Sveta Smirnova
See also bug #49855, bug #44364 and bug #8729

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

Page generated in 0.054 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.