In fact, you are not allowed transactions inside stored functions. Transactions allowed inside stored procedures .
create procedure test( a int ) MODIFIES SQL DATA BEGIN START TRANSACTION ; update t set col='some value' where id=a ; COMMIT ; END //
To return values ββfrom SP, use the output parameters or use the result set from the last select statement in SP.
bobobobo
source share