summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-04-13 18:09:10 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-04-13 18:09:10 +0500
commit19854c6d8c66bc848774b8ee4ad433aa229465de (patch)
treeb4749b2e890efcbe49fdddc527836b6733e5ae5a /sql/sql_rename.cc
parent2187c60bf46c477ea8b0425fbabe6a4dde31c4d7 (diff)
downloadmariadb-git-19854c6d8c66bc848774b8ee4ad433aa229465de.tar.gz
Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist(addon)
mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME). mysql-test/t/upgrade.test: test fix sql/parse_file.cc: mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME). sql/parse_file.h: mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME). sql/sql_rename.cc: mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME). sql/sql_view.cc: mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME). sql/sql_view.h: mysql_rename_view can not rename view if database is not the same. The fix is to add new argument 'new_db' to mysql_rename_view() and allow rename with different databases (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index ced69388009..d4331b12cd4 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -311,7 +311,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name,
my_error(ER_FORBID_SCHEMA_CHANGE, MYF(0), ren_table->db,
new_db);
else
- rc= mysql_rename_view(thd, new_alias, ren_table);
+ rc= mysql_rename_view(thd, new_db, new_alias, ren_table);
break;
default:
DBUG_ASSERT(0); // should never happen