2

I want to update 3 tables based on the start date of another table. So i generate an event scheduler which checks the start date in that table and the current date.. It would be of great help to know if it is possible to create a transaction in an event scheduler

Dharman
  • 30,962
  • 25
  • 85
  • 135
itsdevi
  • 21
  • 2

1 Answers1

2

http://dev.mysql.com/doc/refman/5.6/en/commit.html says:

Within all stored programs (stored procedures and functions, triggers, and events), the parser treats BEGIN [WORK] as the beginning of a BEGIN ... END block. Begin a transaction in this context with START TRANSACTION instead.

(emphasis mine)

This suggests that you can start and commit transactions within an event. But for syntax parsing reasons, don't start a transaction with BEGIN.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828