[MDEV-16305] DECLARE HANDLER is ignored Created: 2018-05-27 Updated: 2018-07-02 Resolved: 2018-07-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Elena Stepanova |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | stored_aggregate_functions | ||
| Description |
|
I found these anomaly while testing aggregate stored functions. I did not test if they occur in regular stored function/procedure.
The first handler should catch the warnings, do nothing and continue; this is something I often do to suppress a useless warning, and it used to work. But now it doesn't:
A funny thing happens if I have at least 4 values. I put this here because it could be strictly related to the above anomaly, but please let me know if I should open a new bug for this:
Note that 4094 error is not listed in the relevant pages:
|
| Comments |
| Comment by Elena Stepanova [ 2018-05-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
For the non-working handler The truncation error occurs when you return value, which is supposed to be DECIMAL(65, 2) UNSIGNED, but of course has a much longer fraction part; but you return the value from another handler, so by definition the handler for 1265 is out of scope. Here is a simpler example:
but if you return from the function body instead,
– it works just fine. For error 4094 (ER_SP_STACK_TRACE), I think it's a separate problem, please do create another bug report. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Federico Razzoli [ 2018-05-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
If I understand correctly your comment, a HANDLER doesn't isn't triggered in the body of another HANDLER. Thanks for the explaination. For 4094 I have filed MDEV-16326. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-05-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Right, it's documented so, e.g. here:
|