shutdown_query event

This polling event accepts SQL script and is fired after a begin_poll event. The return value specifies the shutdown state of the Notifier. The value is null by default, so this event is not fired.

To shut down the Notifier, set up your SQL script to return 'yes'; otherwise, set it to return 'no'. If the Notifier shuts down, the end_poll event is not fired.

When storing the shutdown state in a table, use the end_connection event to reset the state.

See also
Example

The following example uses the ml_add_property system procedure to create a shutdown_query event script for a custom Notifier named Simple. The SELECT statement informs the Notifier to shut down if the tooManyNotifierErrors method returns true.

CALL ml_add_property('SIS', 'Notifier(Simple)', 'shutdown_query',
    'SELECT 
        IF tooManyNotifierErrors() THEN
            'yes'
        ELSE
            'no'
        ENDIF'
);