jmokrauer
asked on
Do nested stored procedures work with transactions?
II was wondering if mySql can handle the transaction rollback across nested procedures like I have below? Does the answer change if there is another transaction in procedure2? Thanks!
CREATE PROCEDURE ee.procedure1()
BEGIN
START TRANSACTION;
UPDATE tbl_a SET colA=1;
CALL procedure2();# this stored procedure updates a tbl_b, tbl_c
COMMIT;
END
Server info:
MySQL 5.0.45-community-nt via TCP/IP
MySQL Client Version 5.1.11
InnoDB Engine
CREATE PROCEDURE ee.procedure1()
BEGIN
START TRANSACTION;
UPDATE tbl_a SET colA=1;
CALL procedure2();# this stored procedure updates a tbl_b, tbl_c
COMMIT;
END
Server info:
MySQL 5.0.45-community-nt via TCP/IP
MySQL Client Version 5.1.11
InnoDB Engine
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.