diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/create_drop_event.result | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/create_drop_event.result')
-rw-r--r-- | mysql-test/main/create_drop_event.result | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/main/create_drop_event.result b/mysql-test/main/create_drop_event.result new file mode 100644 index 00000000..fadfbb6a --- /dev/null +++ b/mysql-test/main/create_drop_event.result @@ -0,0 +1,53 @@ +SET timestamp=UNIX_TIMESTAMP('2014-11-01 10:20:30'); +SET GLOBAL event_scheduler=off; +CREATE TABLE t1 (a INT); +CREATE OR REPLACE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1; +ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS +CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10); +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +ev1 INSERT INTO t1 VALUES (10) +SET GLOBAL event_scheduler=on; +SELECT DISTINCT a FROM t1; +a +10 +SET GLOBAL event_scheduler=off; +DELETE FROM t1; +CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (11); +ERROR HY000: Event 'ev1' already exists +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +ev1 INSERT INTO t1 VALUES (10) +CREATE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12); +Warnings: +Note 1537 Event 'ev1' already exists +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +ev1 INSERT INTO t1 VALUES (10) +CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (13); +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +ev1 INSERT INTO t1 VALUES (13) +SET GLOBAL event_scheduler=on; +SELECT DISTINCT a FROM t1; +a +13 +SET GLOBAL event_scheduler=off; +DELETE FROM t1; +DROP EVENT IF EXISTS ev1; +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +DROP EVENT IF EXISTS ev1; +Warnings: +Note 1305 Event ev1 does not exist +DROP EVENT ev1; +ERROR HY000: Unknown event 'ev1' +SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; +EVENT_NAME EVENT_DEFINITION +DROP TABLE t1; +SET timestamp=DEFAULT; |