You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since a few updates to HeidiSQL (currently using version 12.21), some of my triggers are no longer displayed; more precisely, they have an empty body.
Log msg: /* Result from previous query does not contain expected pattern: (\sDEFINER=(["]?[^"]+[`"]..........
The beginning of the CREATE TRIGGER statement:
[Trigger is displayed -> image "trigger_OK"]
CREATE DEFINER=root@localhost TRIGGER items_a_AFTER_INSERT AFTER INSERT ON items_a FOR EACH ROW BEGIN ..... (one line no line breaks)
[Trigger is not displayed -> image "trigger_empty"]
CREATE DEFINER=daniel@% TRIGGER items_a4_BEFORE_INSERT
BEFORE INSERT ON items_a
FOR EACH
ROW BEGIN
..... (line breaks before AFTER, FOR, BEGIN)
Is this a bug? Does this have anything to do with line breaks?
My current thought:
/* Result from previous query does not contain expected pattern: (\sDEFINER=(["]?[^"]+["]?@["]?[^`"]+[`"]?))?\s+TRIGGER\s+(IF\s+NOT\s+EXISTS\s+)?["]?[^"]+["]?\s+(BEFORE|AFTER)\s+(INSERT|UPDATE|DELETE)\s+ON\s+(["]?[^`"]+[`"]?)\s+FOR\s+EACH\s+ROW\s+(.+)$ */
FOR\s+EACH\s+ROW\s+(.+)$ -->> "(.+)" the dot suppress line-breaks (?)
Normally I write my trigger in as a raw string in notepad or HeidiSQL, the statements with line breaks comes from my Backup-Tool (is a easy trigger export with MySqlBackup.NET (nuget, C#))
trigger_empty:
trigger_OK
HeidiSQL version and OS
12.21 Windows
Database server version
MariaDB 10.11.
Reproduction recipe
trigger OK, run:
CREATE DEFINER=root@localhost TRIGGER items_a_AFTER_INSERT AFTER INSERT ON items_a FOR EACH ROW BEGIN
declare v0, v00 int;
........
trigger empty, run:
CREATE DEFINER=daniel TRIGGER items_a4_BEFORE_INSERT
BEFORE INSERT ON items_a
FOR EACH
ROW BEGIN
DECLARE v1,v2 varchar(45);
......
Same happened to me today.
Based on content of download folder, i am pretty sure i had 12.14 before i updated, only after the update i found this issue.
What i noticed:
empty trigger body
table name changed from correct table to the first table in database
update changed to insert
Basically defaulted to what is displayed when creating new trigger.
Activity
IHaveIssuesWithYourThing commentedon Aug 27, 2026
Same happened to me today.
Based on content of download folder, i am pretty sure i had 12.14 before i updated, only after the update i found this issue.
What i noticed:
Basically defaulted to what is displayed when creating new trigger.