1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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.
This commit is contained in:
evgen@moonbone.local
2006-10-13 21:59:52 +04:00
parent ea8a646dc0
commit 2b474898dc
5 changed files with 200 additions and 76 deletions

View File

@@ -54,3 +54,13 @@ Tables_in_test
t2
t4
drop table t2, t4;
create table t1(f1 int);
create view v1 as select * from t1;
alter table v1 rename to v2;
alter table v1 rename to v2;
ERROR 42S02: Table 'test.v1' doesn't exist
rename table v2 to v1;
rename table v2 to v1;
ERROR 42S01: Table 'v1' already exists
drop view v1;
drop table t1;