[MDEV-20177] Variables lost inside TRIGGER procedures Created: 2019-07-25 Updated: 2019-08-26 Resolved: 2019-08-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Procedure |
| Affects Version/s: | 10.4.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Pedro Rosa | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
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'))); 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. |
| Comments |
| Comment by Alice Sherepa [ 2019-07-26 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Could you please provide the test case to demonstrate the problem. I could not reproduce it:
|