From 49383e87c6cc76a70523634ab0c4655ed7688107 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 10:16:30 +0400 Subject: fixes to make embedded-server test working mysql-test/r/view.result: result fixed mysql-test/r/view_grant.result: result fixed mysql-test/t/query_cache_sql_prepare.test: test fixed mysql-test/t/view.test: moved to view_grant mysql-test/t/view_grant.test: moved here from view.test --- mysql-test/t/view_grant.test | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'mysql-test/t/view_grant.test') diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index acdfec90601..64cafe89d10 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -1073,3 +1073,30 @@ DROP DATABASE db26813; disconnect u1; --echo End of 5.0 tests. + + +# +# Test that ALTER VIEW accepts DEFINER and ALGORITHM, see bug#16425. +# +connection default; +--disable_warnings +DROP VIEW IF EXISTS v1; +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (i INT); +CREATE VIEW v1 AS SELECT * FROM t1; + +ALTER VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; +ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1; +SHOW CREATE VIEW v1; + +DROP VIEW v1; +DROP TABLE t1; + +--echo End of 5.1 tests. -- cgit v1.2.1