Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.4.6
-
Gentoo Linux
Description
Recently problems started to arise while using TRIGGER procedures. If one defines more than one local variable, all become NULL. For example:
SET @dt=FROM_UNIXTIME(TRIM(BOTH '"' FROM JSON_EXTRACT(NEW.json,'$.rx_time')));
SET @bs=TRIM(BOTH '"' FROM JSON_EXTRACT(NEW.json,'$.gw_addr'));
INSERT INTO jsons_params (reference,date_packet,basestation) VALUES (NEW.reference,@dt,@bs);
In this case, both @dt and @bs become NULL, which causes an error in our table for no accepting NULL in timestamps. If we take one of the variables out and substitute its value for a dummy during insert, everything goes ok. However two or more lead to both being NULL.
A similar server, running 10.3.12, does not have these issues at all. Similar triggers run there without problems.
This bug was also reported in a completely different server running the same version of MariaDB. Physically it is a completely different machine with completely different tasks. However the same case ocurred - inside a TRIGGER, two or more variables lead to trouble.
No workarounds were found.