mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug#44860: ALTER TABLE on view crashes server
Problem: executing queries like "ALTER TABLE view1;" we don't check new view's name (which is not specified), that leads to server crash. Fix: do nothing (to be consistent with the behaviour for tables) in such cases. mysql-test/r/view.result: Fix for bug#44860: ALTER TABLE on view crashes server - test result. mysql-test/t/view.test: Fix for bug#44860: ALTER TABLE on view crashes server - test case. sql/sql_rename.cc: Fix for bug#44860: ALTER TABLE on view crashes server - do_rename(): new view/table name must be specified, ASSERT() added. sql/sql_table.cc: Fix for bug#44860: ALTER TABLE on view crashes server - mysql_alter_table(): renaming a view, check if new view name is specified.
This commit is contained in:
@ -3836,6 +3836,14 @@ call p();
|
||||
call p();
|
||||
drop view a;
|
||||
drop procedure p;
|
||||
#
|
||||
# Bug #44860: ALTER TABLE on view crashes server
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT a FROM t1;
|
||||
ALTER TABLE v1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user