mirror of
https://github.com/MariaDB/server.git
synced 2026-01-23 20:04:50 +01:00
Implemented adding, dropping of system triggers and firing them on server start up and shutdown.
13 lines
425 B
Text
13 lines
425 B
Text
--source include/not_embedded.inc
|
|
|
|
--echo # MDEV-30645: CREATE TRIGGER FOR { STARTUP | SHUTDOWN }
|
|
|
|
CREATE TABLE t1 (a VARCHAR(100));
|
|
CREATE TRIGGER IF NOT EXISTS trg1 AFTER STARTUP INSERT INTO t1 VALUES('Startup');
|
|
CREATE TRIGGER IF NOT EXISTS trg2 BEFORE SHUTDOWN INSERT INTO t1 VALUES('Shutdown');
|
|
--source include/restart_mysqld.inc
|
|
SELECT * FROM t1;
|
|
--echo # Clean up
|
|
DROP TABLE t1;
|
|
DROP TRIGGER trg1;
|
|
DROP TRIGGER trg2;
|