Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement generalized triggers 2 #3551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions mysql-test/main/create_drop_shutdown_trigger.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE t1 (inc INT);
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;
inc
0
CREATE OR REPLACE TRIGGER IF NOT EXISTS trg BEFORE SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
CREATE OR REPLACE TRIGGER trg AFTER SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1' at line 1
CREATE TRIGGER trg BEFORE SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;
# restart
SELECT * FROM t1;
inc
1
DROP TABLE t1;
DROP TRIGGER trg ON ALL SERVER;
DROP TRIGGER trg ON ALL SERVER;
ERROR HY000: Trigger does not exist
DROP TRIGGER IF EXISTS trg ON ALL SERVER;
Warnings:
Note 1360 Trigger does not exist
23 changes: 23 additions & 0 deletions mysql-test/main/create_drop_shutdown_trigger.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--source include/not_embedded.inc
--source include/no_view_protocol.inc

CREATE TABLE t1 (inc INT);
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;

--error ER_WRONG_USAGE
CREATE OR REPLACE TRIGGER IF NOT EXISTS trg BEFORE SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;
--error ER_PARSE_ERROR
CREATE OR REPLACE TRIGGER trg AFTER SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;

CREATE TRIGGER trg BEFORE SHUTDOWN DO UPDATE test.t1 SET inc = inc + 1;

--source include/restart_mysqld.inc

SELECT * FROM t1;

DROP TABLE t1;
DROP TRIGGER trg ON ALL SERVER;
--error ER_TRG_DOES_NOT_EXIST
DROP TRIGGER trg ON ALL SERVER;
DROP TRIGGER IF EXISTS trg ON ALL SERVER;
21 changes: 21 additions & 0 deletions mysql-test/main/create_drop_startup_trigger.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE t1 (inc INT);
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;
inc
0
CREATE OR REPLACE TRIGGER IF NOT EXISTS trg AFTER STARTUP DO UPDATE test.t1 SET inc = inc + 1;
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
CREATE OR REPLACE TRIGGER trg BEFORE STARTUP DO UPDATE test.t1 SET inc = inc + 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STARTUP DO UPDATE test.t1 SET inc = inc + 1' at line 1
CREATE TRIGGER trg AFTER STARTUP DO UPDATE test.t1 SET inc = inc + 1;
# restart
SELECT * FROM t1;
inc
1
DROP TABLE t1;
DROP TRIGGER trg ON ALL SERVER;
DROP TRIGGER trg ON ALL SERVER;
ERROR HY000: Trigger does not exist
DROP TRIGGER IF EXISTS trg ON ALL SERVER;
Warnings:
Note 1360 Trigger does not exist
23 changes: 23 additions & 0 deletions mysql-test/main/create_drop_startup_trigger.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--source include/not_embedded.inc
--source include/no_view_protocol.inc

CREATE TABLE t1 (inc INT);
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;

--error ER_WRONG_USAGE
CREATE OR REPLACE TRIGGER IF NOT EXISTS trg AFTER STARTUP DO UPDATE test.t1 SET inc = inc + 1;
--error ER_PARSE_ERROR
CREATE OR REPLACE TRIGGER trg BEFORE STARTUP DO UPDATE test.t1 SET inc = inc + 1;

CREATE TRIGGER trg AFTER STARTUP DO UPDATE test.t1 SET inc = inc + 1;

--source include/restart_mysqld.inc

SELECT * FROM t1;

DROP TABLE t1;
DROP TRIGGER trg ON ALL SERVER;
--error ER_TRG_DOES_NOT_EXIST
DROP TRIGGER trg ON ALL SERVER;
DROP TRIGGER IF EXISTS trg ON ALL SERVER;
57 changes: 57 additions & 0 deletions mysql-test/main/create_trigger_on_schedule.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
SET GLOBAL event_scheduler=off;
CREATE TABLE t1 (a INT);
CREATE OR REPLACE TRIGGER 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 OR REPLACE TRIGGER ev1 IN SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IN SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1' at line 1
CREATE OR REPLACE TRIGGER ev1 AFTER SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1' at line 1
CREATE OR REPLACE TRIGGER ev1 BEFORE SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1' at line 1
CREATE TRIGGER 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 TRIGGER ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (11);
ERROR HY000: Trigger 'ev1' already exists
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (10)
CREATE TRIGGER IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12);
Warnings:
Note 1359 Trigger '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 TRIGGER 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 TRIGGER IF EXISTS ev1 ON ALL SERVER;
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
DROP TRIGGER IF EXISTS ev1 ON ALL SERVER;
Warnings:
Note 1360 Trigger does not exist
DROP TRIGGER ev1 ON ALL SERVER;
ERROR HY000: Trigger does not exist
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION
DROP TABLE t1;
52 changes: 52 additions & 0 deletions mysql-test/main/create_trigger_on_schedule.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
--source include/not_embedded.inc
--source include/no_view_protocol.inc

SET GLOBAL event_scheduler=off;

CREATE TABLE t1 (a INT);

--error ER_WRONG_USAGE
CREATE OR REPLACE TRIGGER IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
--error ER_PARSE_ERROR
CREATE OR REPLACE TRIGGER ev1 IN SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
--error ER_PARSE_ERROR
CREATE OR REPLACE TRIGGER ev1 AFTER SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
--error ER_PARSE_ERROR
CREATE OR REPLACE TRIGGER ev1 BEFORE SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;

CREATE TRIGGER ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10);
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
--source include/count_sessions.inc
SET GLOBAL event_scheduler=on;
let $wait_condition= SELECT count(*)>0 FROM t1;
--source include/wait_condition.inc
SELECT DISTINCT a FROM t1;
SET GLOBAL event_scheduler=off;
--source include/wait_until_count_sessions.inc
DELETE FROM t1;

--error ER_TRG_ALREADY_EXISTS
CREATE TRIGGER ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (11);
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
CREATE TRIGGER IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12);
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
CREATE OR REPLACE TRIGGER ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (13);
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;

SET GLOBAL event_scheduler=on;
let $wait_condition= SELECT count(*)>0 FROM t1;
--source include/wait_condition.inc
SELECT DISTINCT a FROM t1;
SET GLOBAL event_scheduler=off;
--source include/wait_until_count_sessions.inc
DELETE FROM t1;

DROP TRIGGER IF EXISTS ev1 ON ALL SERVER;
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
DROP TRIGGER IF EXISTS ev1 ON ALL SERVER;
--error ER_TRG_DOES_NOT_EXIST
DROP TRIGGER ev1 ON ALL SERVER;
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;

DROP TABLE t1;

1 change: 1 addition & 0 deletions mysql-test/main/features.result
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Binlog_group_commit_trigger_lock_wait 0
Binlog_group_commit_trigger_timeout 0
Com_create_trigger 1
Com_drop_trigger 1
Com_drop_trigger_server 0
Com_show_create_trigger 0
Com_show_triggers 1
Executed_triggers 2
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/main/mysql_upgrade-28915.result
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
Phase 1/8: Checking and upgrading mysql database
Expand Down Expand Up @@ -275,6 +276,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
# Emulate that tables were created with utf8mb4 by an older version
Expand Down Expand Up @@ -541,6 +543,7 @@ Create Table CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
SET GLOBAL event_scheduler=OFF;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/mysqld--help.result
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,7 @@ performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-sql-text-length 1024
performance-schema-max-stage-classes 160
performance-schema-max-statement-classes 222
performance-schema-max-statement-classes 223
performance-schema-max-statement-stack 10
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/sp2.test

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mysql-test/main/system_mysql_db.result
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/system_mysql_db_fix40123.result
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/system_mysql_db_fix50030.result
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/system_mysql_db_fix50117.result
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/system_mysql_db_fix50568.result
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ event CREATE TABLE `event` (
`collation_connection` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`db_collation` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
`body_utf8` longblob DEFAULT NULL,
`event_kind` enum('SCHEDULE','STARTUP','SHUTDOWN') NOT NULL DEFAULT 'SCHEDULE',
PRIMARY KEY (`db`,`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events'
show create table general_log;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/events/events_restart.result
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin;
# Now we restart the server
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
call mtr.add_suppression("System trigger: Failed to open table mysql.event");
# restart
use events_test;
select @@event_scheduler;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/events/events_restart.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ alter table mysql.event
--echo # Now we restart the server

call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
call mtr.add_suppression("System trigger: Failed to open table mysql.event");
--source include/restart_mysqld.inc

use events_test;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_1/r/innodb_trig_0102.result
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ drop trigger trg_1;
Testcase 3.5.1.3:
-----------------
CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/funcs_1/r/is_columns_mysql.result
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(6
def mysql event db_collation 21 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) select,insert,update,references NEVER NULL NO NO
def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) select,insert,update,references NEVER NULL NO NO
def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL NO NO
def mysql event event_kind 23 'SCHEDULE' NO enum 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('SCHEDULE','STARTUP','SHUTDOWN') select,insert,update,references NEVER NULL NO NO
def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL NO NO
def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references NEVER NULL NO NO
def mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL NO NO
Expand Down Expand Up @@ -394,6 +395,7 @@ NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql event collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
3.0000 mysql event db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql event event_kind enum 8 24 utf8mb3 utf8mb3_general_ci enum('SCHEDULE','STARTUP','SHUTDOWN')
3.0000 mysql func name char 64 192 utf8mb3 utf8mb3_bin char(64)
NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql func dl char 128 384 utf8mb3 utf8mb3_bin char(128)
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def mysql event db 1 '' NO char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(6
def mysql event db_collation 21 NULL YES char 64 192 NULL NULL NULL utf8mb3 utf8mb3_bin char(64) NEVER NULL NO NO
def mysql event definer 4 '' NO varchar 384 1152 NULL NULL NULL utf8mb3 utf8mb3_bin varchar(384) NEVER NULL NO NO
def mysql event ends 12 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL NO NO
def mysql event event_kind 23 'SCHEDULE' NO enum 8 24 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('SCHEDULE','STARTUP','SHUTDOWN') NEVER NULL NO NO
def mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL NO NO
def mysql event interval_field 7 NULL YES enum 18 54 NULL NULL NULL utf8mb3 utf8mb3_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') NEVER NULL NO NO
def mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL NO NO
Expand Down Expand Up @@ -391,6 +392,7 @@ NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql event collation_connection char 64 192 utf8mb3 utf8mb3_bin char(64)
3.0000 mysql event db_collation char 64 192 utf8mb3 utf8mb3_bin char(64)
1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql event event_kind enum 8 24 utf8mb3 utf8mb3_general_ci enum('SCHEDULE','STARTUP','SHUTDOWN')
3.0000 mysql func name char 64 192 utf8mb3 utf8mb3_bin char(64)
NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql func dl char 128 384 utf8mb3 utf8mb3_bin char(128)
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_1/r/memory_trig_0102.result
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ drop trigger trg_1;
Testcase 3.5.1.3:
-----------------
CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/funcs_1/r/myisam_trig_0102.result
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ drop trigger trg_1;
Testcase 3.5.1.3:
-----------------
CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
Expand Down
Loading