Commit b83d5835 authored by Bjorn Munch's avatar Bjorn Munch

Two more funcs_1 updates after 43588

parent 7f20e9fd
......@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges;
DROP PROCEDURE IF EXISTS sp1;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
......@@ -91,7 +90,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
......@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
--------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3;
......@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
USE db_storedproc_1;
......@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer
......@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp5_s_i();
......@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
......@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
......@@ -340,7 +332,6 @@ c1
inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
......@@ -361,7 +352,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
......@@ -379,7 +369,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1
CALL sp3166_s_i();
......
......@@ -81,7 +81,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
......@@ -94,7 +93,6 @@ DECLARE res INT;
SET res = n * n;
RETURN res;
END//
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
......@@ -113,7 +111,6 @@ fn31105( 9 )
81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
......@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc
CALL sp31102();
......
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