Bug #5508 Views:RENAME doesn't work with views

Submitted: 10 Sep 2004 2:40 Modified: 19 Sep 2005 17:48
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha OS:Linux (SuSE 8.2)
Assigned to: Georg Richter CPU Architecture:Any

[10 Sep 2004 2:40] Peter Gulutzan
Description:
RENAME should work with views, the same way that it works with base tables. 
Alternatively, non-standard statements that don't work for all table types (TRUNCATE, 
RENAME, etc.) should not be supported by MySQL. 
 

How to repeat:
mysql> create table t (s1 int); 
Query OK, 0 rows affected (0.28 sec) 
 
mysql> create view v as select * from t; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> rename table t to t2; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> rename table v to v2; 
ERROR 1017 (HY000): Can't find file: './db5/v.frm' (errno: 22)
[19 Aug 2005 10:47] MySQL Verification Team
verified with 5.0.12
[16 Sep 2005 15:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29990
[19 Sep 2005 3:43] Georg Richter
Pushed into 5.0.14
[19 Sep 2005 17:48] Paul DuBois
Noted in 5.0.14 changelog.
[10 Nov 2005 18:17] J Jorgenson
Just installed v5.0.15... Tested with
  CREATE TABLE t (value INT);
  CREATE VIEW  v AS SELECT value FROM t;
  ALTER VIEW v RENAME v2;  <-- Generates an Error starting at 'RENAME'
[11 Nov 2005 18:38] Oleksandr Byelkin
Could you please fill a new bugreport (with ALTER TABLE, because a view is a table, and we do not want invent new command in this case). If you do not make bugreport I will. But if you make it you will be able to track progress of bugfixing.
[15 Nov 2005 20:56] Oleksandr Byelkin
I've made BUG#14959

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

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