MySQL Forums
Forum List  »  Stored Procedures

Re: newbie: Stored proc silently fails
Posted by: 7 reeds
Date: June 25, 2012 05:15PM

Peter Brawley Wrote:
-------------------------------------------------------
> > I have seen that stored procs may not include
> transactions
>
> You saw that where?

"The trigger cannot use statements that explicitly or implicitly begin or end a transaction such as START TRANSACTION, COMMIT, or ROLLBACK."

http://dev.mysql.com/doc/refman/5.0/en/trigger-syntax.html


>
> > ...SET s.end_id = @id ...
>
> What sets the user variable @id?

@id comes in through the "CALL"ing trigger. It is the "NEW.id" of the INSERT.

Options: ReplyQuote


Subject
Views
Written By
Posted
2443
June 25, 2012 02:28PM
Re: newbie: Stored proc silently fails
1223
June 25, 2012 05:15PM
1170
June 25, 2012 11:52PM


Sorry, you can't reply to this topic. It has been closed.

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.