MySQL Forums :: Stored Procedures :: Running the procedure in INVOKER Schema


Advanced Search

Running the procedure in INVOKER Schema
Posted by: ravi kumar ()
Date: February 28, 2017 03:59PM

Hi,
i Want the procedure to be running in the INVOKER schema rather than DEFINER schema

i have table test in the schema a and schema b ;
and i have a procedure in schema a called testravi with below code
DELIMITER #
USE a#
DROP PROCEDURE IF EXISTS testravi#

CREATE PROCEDURE testravi(
in_test varchar(30)
)
proc_label : BEGIN
insert into CURRENT_USER().test (c_test) values (in_test);


END #
delimiter ;

i gave the grants to the user b on testravi procedure

below is what i am looking for
1) when i execute the procedure from schema b i want it to insert the table test in schema b
2) when i execute the procedure from schema a i want it to insert the table test in schema a

Options: ReplyQuote


Subject Views Written By Posted
Running the procedure in INVOKER Schema 595 ravi kumar 02/28/2017 03:59PM
Re: Running the procedure in INVOKER Schema 46 Peter Brawley 02/28/2017 06:05PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.