Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.16, 11.0.4
-
None
-
Can result in unexpected behaviour
-
For INSERT.. ON DUPLICATE KEY UPDATE, AFTER UPDATE trigger is now always executed in case of duplicate key, even if update did not result in any data changes. This matches the existing behavior of UPDATE command.
-
Q3/2025 Maintenance, Q4/2025 Server Maintenance, Q2/2026 Server Maintenance
Description
According to https://mariadb.com/kb/en/trigger-overview/ - the following triggers should fire when an ON DUPLICATE KEY insert is used and a duplicate is detected:
BEFORE INSERT;
BEFORE UPDATE;
AFTER UPDATE.
We're seeing that the AFTER UPDATE trigger never fires when a duplicate row is inserted. See attached test case and output.
Tested on 10.6.16 and 11.0.4