mariadb/mysql-test/suite
Dmitry Shulga ecb7c9b692 MDEV-10164: Add support for TRIGGERS that fire on multiple events
Added capability to create a trigger associated with several trigger
events. For this goal, the syntax of the CREATE TRIGGER statement
was extended to support the syntax structure { event [ OR ... ] }
for the `trigger_event` clause. Since one trigger will be able to
handle several events it should be provided a way to determine what
kind of event is handled on execution of a trigger. For this goal
support of the clauses INSERTING, UPDATING , DELETING was added by
this patch. These clauses can be used inside a trigger body to detect
what kind of trigger action is currently processed using the following
boilerplate:
  IF INSERTING THEN ...
  ELSIF UPDATING THEN ...
  ELSIF DELETING THEN ...
In case one of the clauses INSERTING, UPDATING, DELETING specified in
a trigger's body not matched with a trigger event type, the error
ER_INCOMPATIBLE_EVENT_FLAG is emitted.

After this patch be pushed, one Trigger object will be associated with
several trigger events. It means that the array
  Table_triggers_list::triggers
can contain several pointers to the same Trigger object in array members
corresponding to different events. Moreover, support of several trigger
events for the same trigger requires that the data members `next` and
`action_order` of the Trigger class be converted to arrays to store
relating information per trigger event base.

Ability to specify the same trigger for different event types results in
necessity to handle invalid cases on execution of the multi-event
trigger, when the OLD or NEW qualifiers doesn't match a current event
type against that the trigger is run. The clause OLD should produces
the NULL value for INSERT event, whereas the clause NEW should produce
the NULL value for DELETE event.
2025-04-19 18:36:03 +07:00
..
archive MDEV-36050 DATA/INDEX DIRECTORY handling is inconsistent 2025-04-18 09:41:23 +02:00
atomic Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
binlog cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
binlog_encryption Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
client MDEV-14978 fix client.client-env-variable test 2024-10-19 16:53:16 +02:00
compat MDEV-20034 Add support for the pre-defined weak SYS_REFCURSOR 2025-04-19 10:59:58 +04:00
csv MDEV-36050 DATA/INDEX DIRECTORY handling is inconsistent 2025-04-18 09:41:23 +02:00
encryption Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
engines Fix typos in user-facing messages 2025-04-19 02:47:33 +04:00
events Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
federated Merge 11.4 into 11.8 2025-03-05 20:39:47 +02:00
funcs_1 MDEV-10164: Add support for TRIGGERS that fire on multiple events 2025-04-19 18:36:03 +07:00
funcs_2 Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
galera Merge branch '11.8' into main 2025-04-18 17:11:01 +02:00
galera_3nodes Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
galera_3nodes_sr Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
galera_sr Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
gcol Merge 11.4 into 11.8 2025-03-05 20:39:47 +02:00
handler Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
heap Merge branch '11.4' into 11.7 2025-02-06 16:46:36 +01:00
innodb MDEV-36050 DATA/INDEX DIRECTORY handling is inconsistent 2025-04-18 09:41:23 +02:00
innodb_fts Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
innodb_gis Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
innodb_i_s
innodb_zip fix incorrect merge 15700f54c2 2025-04-18 09:41:24 +02:00
jp
json MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
large_tests
maria MDEV-34413 Index Condition Pushdown for reverse ordered scans 2025-03-19 16:03:29 -04:00
mariabackup Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
merge
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source Merge branch '11.8' into main 2025-04-18 17:11:01 +02:00
optimizer_unfixed_bugs
parts MDEV-36050 DATA/INDEX DIRECTORY handling is inconsistent 2025-04-18 09:41:23 +02:00
perfschema MDEV-20034 Add support for the pre-defined weak SYS_REFCURSOR 2025-04-19 10:59:58 +04:00
perfschema_stress
period cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
plugins Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
roles 12.0 branch 2025-02-12 12:37:38 +01:00
rpl Merge branch '11.8' into main 2025-04-18 17:11:01 +02:00
s3 Merge branch '11.7' into 11.8 2025-02-11 20:29:43 +01:00
sql_sequence Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
storage_engine
stress
sys_vars MDEV-14091 Support password protected SSL key in server. 2025-04-19 14:04:10 +03:00
sysschema MDEV-31736: format_bytes implementation 2024-11-26 13:10:01 +04:00
unit
vcol fix incorrect merge 15700f54c2 2025-04-18 09:41:24 +02:00
versioning fix incorrect merge 15700f54c2 2025-04-18 09:41:24 +02:00
wsrep Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00