Details
-
Bug
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
12.2
-
None
-
None
Description
I have MariaDB 12.2.0.
The manual for CREATE TRIGGER does not mention multiple ORed events
https://mariadb.com/docs/server/server-usage/triggers-events/triggers/create-trigger
but MDEV-10164 is closed.
I say
CREATE TABLE t1 (s1 INT, s2 INT); |
CREATE TRIGGER t1 BEFORE UPDATE OF s1 OR INSERT ON t1 FOR EACH ROW SET @a = @a + 1; |
CREATE TRIGGER t1 BEFORE INSERT OR UPDATE OF s1 ON t1 FOR EACH ROW SET @a = @a + 1; |
SELECT event_manipulation FROM information_schema.triggers WHERE trigger_name = 't1'; |
The first CREATE TRIGGER statement fails.
The second CREATE TRIGGER statement succeeds. This is inconsistent behaviour.
The SELECT returns "INSERT,UPDATE". This is incomplete information.
By the way, I intend to mention this feature (and any flaws) in a blog post soon.
Attachments
Issue Links
- is caused by
-
MDEV-10164 Add support for TRIGGERS that fire on multiple events
-
- Closed
-