MySQL Forums
Forum List  »  Events (Job Scheduler)

MySQL Events and Transactions
Posted by:
Date: October 18, 2007 08:43AM

I'm just getting started with using the new mySQL event feature and I had a couple questions.

First question is if the sql commands that are executed for the event are held in their own transaction? I need to update multiple tables with related data and can only do it with multiple sql statements in a transaction.

Now, if the event isn't executed within a transaction can I include
start transaction; SQL STATEMENTS; commit; for the event? I've tried this and it doesn't seem to work.

ex.
create event e on schedule every 1 second do start transaction;insert into test.counts values(5,5);commit;

That only stores the first statement. I've been trying to figure out how to do compound statements within the events but haven't got it yet. Any help at all would be really appreciated.

-John

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Events and Transactions
7212
October 18, 2007 08:43AM
3987
December 27, 2007 10:22AM


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.