[MDEV-20074] Lost connection on update trigger Created: 2019-07-16 Updated: 2020-06-03 Resolved: 2019-10-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Sequences, Server |
| Affects Version/s: | 10.3, 10.4 |
| Fix Version/s: | 10.3.19, 10.4.9 |
| Type: | Bug | Priority: | Critical |
| Reporter: | miracee | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04 and Ubuntu 19.04 |
||
| Issue Links: |
|
||||||||
| Description |
|
Test:
It is also not working when using AFTER UPDATE. Best Regards, Susanne |
| Comments |
| Comment by miracee [ 2019-07-16 ] | |||||||||||||||||||||||||||||
|
Version 10.4.6 | |||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2019-07-21 ] | |||||||||||||||||||||||||||||
|
Thanks for the report and test case.
| |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-15 ] | |||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-16 ] | |||||||||||||||||||||||||||||
|
the default() code which address "next" table to find table referred in default expression, somehow already points on that "next", and so trying to get next to that "next", which is absent:
| |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-16 ] | |||||||||||||||||||||||||||||
|
SP INSERT instruction has only one table (t2) in both local and global lists (no surprise that s1 is not opened) | |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-16 ] | |||||||||||||||||||||||||||||
|
internal_tables of the table t2 present, but is not opened | |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-16 ] | |||||||||||||||||||||||||||||
|
It is alway not the best idea to check current command, especially inside trigger:
| |||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-10-16 ] | |||||||||||||||||||||||||||||
|
The check above made when we open tables for UPDATE, and have no idea what for the tables is (some for a trigger and INSERT inside it) |