Bug #14959 ALTER TABLE RENAME does not work with view
Submitted: 15 Nov 2005 21:54 Modified: 25 Oct 2006 20:50
Reporter: Oleksandr Byelkin
Status: Closed
Category:Server: Optimizer Severity:S3 (Non-critical)
Version:5.0 OS:Any (all)
Assigned to: Evgeny Potemkin Target Version:

[15 Nov 2005 21:54] Oleksandr Byelkin
Description:
ALTER TABLE RENAME does not work with view, when RENAME does.

How to repeat:
CREATE TABLE t1 (value INT);
CREATE VIEW  v1 AS SELECT value FROM t1;
ALTER TABLE v1 RENAME v2;
[22 Sep 2006 20:18] 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/commits/12424

ChangeSet@1.2273, 2006-09-22 21:57:24+04:00, evgen@moonbone.local +5 -0
  Fixed bug#14959: ALTER TABLE isn't able to rename a view
  
  The mysql_alter_table() was able to rename only a table.
  
  The view/table renaming code is moved from the function rename_tables 
  to the new function called do_rename().
  The mysql_alter_table() function calls it when it needs to rename a view.
[13 Oct 2006 20:02] 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/commits/13678

ChangeSet@1.2299, 2006-10-13 21:59:52+04:00, evgen@moonbone.local +5 -0
  Bug#14959: ALTER TABLE isn't able to rename a view
  
  The mysql_alter_table() was able to rename only a table.
  
  The view/table renaming code is moved from the function rename_tables 
  to the new function called do_rename().
  The mysql_alter_table() function calls it when it needs to rename a view.
[21 Oct 2006 11:10] Georgi Kodinov
Pushed in 5.0.27/5.1.13-beta
[25 Oct 2006 20:50] Paul DuBois
Noted in 5.0.30, 5.1.13 changelogs.

(The 5.0.x fix is in 5.0.30.)