EPUB | CHM | PDF

Event Editor

Top Previous Next

The MySQL Event Editor is provided for altering SQL views. To open the MySQL Event Editor, simply double-click an event on the diagram or select the Properties item from the context menu. The MySQL Event Editor contains several tabs, each of which will be described below.

General

editor-event-general

This tab allows you to set the name of the event and write comments for it. There are the following fields on the tab:

Event Name
Sets the name of the event. To check your diagram for the uniqueness of names use the Check Diagram tool.

Preserve event after fireing
Normally, once an event has expired, it is immediately dropped. You can override this behavior by checking this option. This will add ON COMPLETION PRESERVE clause to CREATE EVENT statement.

Event is enabled
You can create an event but keep it from being active turning off this option. The DISABLE keyword will be added to CREATE EVENT statement in this case.

Event Definer
The DEFINER clause specifies the MySQL account to be used when checking access privileges at event execution time.

Comments
A native comment for the event.

Generate
Set this option off to exclude the event from the default selection in the Database Generation and Database Modification tools.

Schedule

editor-event-schedule

This tab allows you to set up event schedule. There are two types of events in MySQL:

Transient event
Event that executed one time only at specified date and time. You can set up exact execution date and time or use CURRENT_TIMESTAMP with some interval added.

Recurrent event
Event that executed periodically according to its schedule. You have to set up execution interval (Execute EVERY) for such events. You can also specify Start Time or End Time for such events.

Please refer CREATE EVENT Syntax topic of MySQL Manual for more details about event schedule options: http://dev.mysql.com/doc/refman/5.1/en/create-event.html

Definition

This tab allows to set the SQL statement(s) that provides the body of event. This SQL code will be executed at specified time.

Quick Create button
This button allows to execute CREATE EVENT statement with current event body. This can be useful when you want to test event creation without closing editor.

Script

This tab allows you to set SQL statements, which will be executed before (use Begin tab) and after (use End tab) generation of the event.

Preview

The Preview tab displays the SQL statement, which will be executed during the database generation. This statement is made up according to the changes you have made using previous tabs. Note, that the text within the editor is read-only. The content of this tab updates only when your press Apply button.

Notes

The Notes tab allows you to define a description and an annotation for the edited event. This properties will not affect the physical database, but they can be useful for your diagram development.

Format

These options allow you to set the event symbol line and fill color for displaying on the diagram, different from the default colors.

See also:
Diagram Objects: Events | Creating an Event | Event Manager