Bug #14959 ALTER TABLE RENAME does not work with view
Submitted: 15 Nov 2005 20:54 Modified: 25 Oct 2006 18:50
Reporter: Oleksandr Byelkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.0 OS:Any (all)
Assigned to: Evgeny Potemkin CPU Architecture:Any

[15 Nov 2005 20: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 18: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 18: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 9:10] Georgi Kodinov
Pushed in 5.0.27/5.1.13-beta
[25 Oct 2006 18:50] Paul DuBois
Noted in 5.0.30, 5.1.13 changelogs.

(The 5.0.x fix is in 5.0.30.)
[5 May 2010 7:20] Jon Stephens
See also BUG#52225 and BUG#53409.
[6 Jan 2011 8:45] 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/128052

3229 Tatiana Azundris Nurnberg	2011-01-06
      Bug#53409: Alter table can't rename a view with special characters
      Bug#14959
      Bug#52225
      
      Add missing test case for regular (non-NDB) server.
      We now try to handle database names with periods etc. correctly in ALTER.
     @ mysql-test/r/rename.result
        test
     @ mysql-test/t/rename.test
        test