Description
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);
......
Error/Backtrace
Description
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@localhostTRIGGERitems_a_AFTER_INSERTAFTER INSERT ONitems_aFOR EACH ROW BEGIN ..... (one line no line breaks)[Trigger is not displayed -> image "trigger_empty"]
CREATE DEFINER=
daniel@%TRIGGERitems_a4_BEFORE_INSERTBEFORE INSERT ON
items_aFOR 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@localhostTRIGGERitems_a_AFTER_INSERTAFTER INSERT ONitems_aFOR EACH ROW BEGINdeclare v0, v00 int;
........
trigger empty, run:
CREATE DEFINER=daniel TRIGGER
items_a4_BEFORE_INSERTBEFORE INSERT ON
items_aFOR EACH
ROW BEGIN
DECLARE v1,v2 varchar(45);
......
Error/Backtrace