Commit 5a4169d6 authored by unknown's avatar unknown

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
parent 9cabdbcd
...@@ -3321,36 +3321,4 @@ DROP TABLE `t-2`; ...@@ -3321,36 +3321,4 @@ DROP TABLE `t-2`;
DROP VIEW `v-2`; DROP VIEW `v-2`;
DROP DATABASE `d-1`; DROP DATABASE `d-1`;
USE test; 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. End of 5.1 tests.
...@@ -797,3 +797,36 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI ...@@ -797,3 +797,36 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
DROP USER u26813@localhost; DROP USER u26813@localhost;
DROP DATABASE db26813; DROP DATABASE db26813;
End of 5.0 tests. 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.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
-- source include/have_query_cache.inc -- 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; connection default;
set global query_cache_size=100000; set global query_cache_size=100000;
......
...@@ -3216,29 +3216,4 @@ DROP VIEW `v-2`; ...@@ -3216,29 +3216,4 @@ DROP VIEW `v-2`;
DROP DATABASE `d-1`; DROP DATABASE `d-1`;
USE test; 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. --echo End of 5.1 tests.
...@@ -1073,3 +1073,30 @@ DROP DATABASE db26813; ...@@ -1073,3 +1073,30 @@ DROP DATABASE db26813;
disconnect u1; disconnect u1;
--echo End of 5.0 tests. --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.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment