mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user