diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-05-19 09:25:36 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-05-19 09:25:36 +0500 |
commit | fb3e433d4e89b8b111444a1460ea2f4cacadbb9b (patch) | |
tree | ab67ed94e3da5e3f5bb47ac3fdc1ea943aef80e1 /mysql-test/t/view.test | |
parent | d4be7dadb8085facb90de4e68444903ecdb23310 (diff) | |
download | mariadb-git-fb3e433d4e89b8b111444a1460ea2f4cacadbb9b.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 39db92ee1bc..a788b5ab41e 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3859,6 +3859,17 @@ drop procedure p; ########################################################################### + +--echo # +--echo # Bug #44860: ALTER TABLE on view crashes server +--echo # +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT a FROM t1; +ALTER TABLE v1; +DROP VIEW v1; +DROP TABLE t1; + + --echo # ----------------------------------------------------------------- --echo # -- End of 5.1 tests. --echo # ----------------------------------------------------------------- |