summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/view.result32
-rw-r--r--mysql-test/r/view_grant.result33
-rw-r--r--mysql-test/t/query_cache_sql_prepare.test2
-rw-r--r--mysql-test/t/view.test25
-rw-r--r--mysql-test/t/view_grant.test27
5 files changed, 61 insertions, 58 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 9d20a8a16c7..0fa7cda1187 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -3321,36 +3321,4 @@ DROP TABLE `t-2`;
DROP VIEW `v-2`;
DROP DATABASE `d-1`;
USE test;
-DROP VIEW IF EXISTS v1;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (i INT);
-CREATE VIEW v1 AS SELECT * FROM t1;
-ALTER VIEW v1 AS SELECT * FROM t1;
-SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
-ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1;
-Warnings:
-Note 1449 There is no 'no_such'@'user_1' registered
-SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
-Warnings:
-Note 1449 There is no 'no_such'@'user_1' registered
-ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
-SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
-Warnings:
-Note 1449 There is no 'no_such'@'user_1' registered
-ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1;
-Warnings:
-Note 1449 There is no 'no_such'@'user_2' registered
-SHOW CREATE VIEW v1;
-View Create View
-v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
-Warnings:
-Note 1449 There is no 'no_such'@'user_2' registered
-DROP VIEW v1;
-DROP TABLE t1;
End of 5.1 tests.
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index a8770bdac41..2a0bedc1443 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -797,3 +797,36 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
DROP USER u26813@localhost;
DROP DATABASE db26813;
End of 5.0 tests.
+DROP VIEW IF EXISTS v1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+ALTER VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
+ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1;
+Warnings:
+Note 1449 There is no 'no_such'@'user_1' registered
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
+Warnings:
+Note 1449 There is no 'no_such'@'user_1' registered
+ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
+Warnings:
+Note 1449 There is no 'no_such'@'user_1' registered
+ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1;
+Warnings:
+Note 1449 There is no 'no_such'@'user_2' registered
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1`
+Warnings:
+Note 1449 There is no 'no_such'@'user_2' registered
+DROP VIEW v1;
+DROP TABLE t1;
+End of 5.1 tests.
diff --git a/mysql-test/t/query_cache_sql_prepare.test b/mysql-test/t/query_cache_sql_prepare.test
index 69b504e2fd1..98141153002 100644
--- a/mysql-test/t/query_cache_sql_prepare.test
+++ b/mysql-test/t/query_cache_sql_prepare.test
@@ -5,7 +5,7 @@
-- source include/have_query_cache.inc
-connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (con1,localhost,root,,test,$MASTER_MYPORT,);
connection default;
set global query_cache_size=100000;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 026a08bf365..4961d95d0ac 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -3216,29 +3216,4 @@ DROP VIEW `v-2`;
DROP DATABASE `d-1`;
USE test;
-
-#
-# Test that ALTER VIEW accepts DEFINER and ALGORITHM, see bug#16425.
-#
---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.
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.