SHOW EVENTS
Syntax
This statement displays information about Event Manager events. It requires the EVENT
privilege for the database from which the events are to be shown.
In its simplest form, SHOW EVENTS
lists all of the events in the current schema:
mysql>SELECT CURRENT_USER(), SCHEMA();
+----------------+----------+ | CURRENT_USER() | SCHEMA() | +----------------+----------+ | jon@ghidora | myschema | +----------------+----------+ 1 row in set (0.00 sec) mysql>SHOW EVENTS\G
*************************** 1. row *************************** Db: myschema Name: e_daily Definer: jon@ghidora Time zone: SYSTEM Type: RECURRING Execute at: NULL Interval value: 10 Interval field: SECOND Starts: 2006-02-09 10:41:23 Ends: NULL Status: ENABLED Originator: 0 character_set_client: latin1 collation_connection: latin1_swedish_ci Database Collation: latin1_swedish_ci
To see events for a specific schema, use the FROM
clause. For example, to see events for the test
schema, use the following statement:
SHOW EVENTS FROM test;
The LIKE
clause, if present, indicates which event names to match. The WHERE
clause can be given to select rows using more general conditions, as discussed in , "Extensions to SHOW
Statements".
SHOW EVENTS
output has the following columns:
Db
: The schema (database) on which the event is defined.Name
: The name of the event.Time zone
: The event time zone, which is the time zone used for scheduling the event and that is in effect within the event as it executes. The default value isSYSTEM
.Definer
: The account of the user who created the event, in'
format.user_name
'@'host_name
'Type
: The event repetition type, eitherONE TIME
(transient) orRECURRING
(repeating).Execute At
: The date and time when a transient event is set to execute. Shown as aDATETIME
value.For a recurring event, the value of this column is always
NULL
.Interval Value
: For a recurring event, the number of intervals to wait between event executions.For a transient event, the value of this column is always
NULL
.Interval Field
: The time units used for the interval which a recurring event waits before repeating.For a transient event, the value of this column is always
NULL
.Starts
: The start date and time for a recurring event. This is displayed as aDATETIME
value, and isNULL
if no start date and time are defined for the event.For a transient event, this column is always
NULL
.Ends
: The end date and time for a recurring event. This is displayed as aDATETIME
value, and defaults toNULL
if no end date and time is defined for the event.For a transient event, this column is always
NULL
.Status
: The event status. One ofENABLED
,DISABLED
, orSLAVESIDE_DISABLED
.SLAVESIDE_DISABLED
indicates that the creation of the event occurred on another MariaDB server acting as a replication master and replicated to the current MariaDB server which is acting as a slave, but the event is not presently being executed on the slave.Originator
: The server ID of the MariaDB server on which the event was created. Defaults to 0.character-set-client
is the session value of thecharacter_set_client
system variable when the routine was created.collation_connection
is the session value of thecollation_connection
system variable when the routine was created.Database Collation
is the collation of the database with which the routine is associated.
For more information about SLAVE_DISABLED
and the Originator
column, see , "Replication of Invoked Features".
The event action statement is not shown in the output of SHOW EVENTS
. Use SHOW CREATE EVENT
or the INFORMATION_SCHEMA.EVENTS
table.
Times displayed by SHOW EVENTS
are given in the event time zone, as discussed in , "Event Metadata".
The columns in the output of SHOW EVENTS
are similar to, but not identical to the columns in the INFORMATION_SCHEMA.EVENTS
table. See , "The INFORMATION_SCHEMA EVENTS
Table".