[MDEV-19521] Update Table Fails with Trigger and Stored Function Created: 2019-05-18 Updated: 2019-06-01 Resolved: 2019-05-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update, Stored routines, Triggers |
| Affects Version/s: | 10.2.24 |
| Fix Version/s: | 10.2.25, 5.5.65, 10.1.41, 10.3.16, 10.4.6 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Bryce Lowe | Assignee: | Alice Sherepa |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Tested on Amazon Linux 2 (VM) and CentOS 7 (Bare Metal) |
||
| Issue Links: |
|
||||||||
| Description |
|
In upgrading my MariaDB Server from version 10.2.23 to 10.2.24 I ran into a problem that resulted in me having to revert my environment back to 10.2.23. I have a table with a before update trigger that references a stored function. Prior to MariaDB 10.2.24, the following code ran successfully:
In MariaDB 10.2.24, the update statement in step 7 does not execute, you get the error "FUNCTION testdata.test does not exist". However, if you call the exact same function (what is done in step 9) it succeeds. A couple of things that might be worth knowing. First, updating the table in a non-joined update statement works fine:
Also potentially worth noting, if you run the non-joined update statement, the immediately execute the bug test case, everything works fine. However if you restart the MariaDB daemon and you re-run the test case it fails. This leads me to believe that the non-joined update statement is pulling the table into cache which allows the joined statement to succeed. However it only succeeds temporarily. Please let me know if I can provide any additional information. |
| Comments |
| Comment by Alice Sherepa [ 2019-05-20 ] |
|
Thanks! |