[MDEV-16315] NOT FOUND condition not triggered in stored aggregate functions Created: 2018-05-29 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Federico Razzoli | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | stored_aggregate_functions | ||
| Description |
|
Both the following example show that NOT FOUND condition does not occur. This is a different problem than Realistic test:
Trivial test to prove that the problem is not HANDLER:
|
| Comments |
| Comment by Elena Stepanova [ 2018-05-29 ] | |||||||||||||||||||||||||||||||||||||
|
If I understand correctly, it only applies to empty tables. For example, in the second test case
we indeed have
but if we insert a row, the expected error starts popping up:
and if we insert two more rows, everything works again:
Is it so also for you, or did you observe problems with non-empty tables? | |||||||||||||||||||||||||||||||||||||
| Comment by Federico Razzoli [ 2018-05-29 ] | |||||||||||||||||||||||||||||||||||||
|
I didn't notice before. I confirm that with non-empty tables it doesn't happen. But it happens, in a different way, without tables at all:
"In a different way" means that I also see error 4094. I'm not complaining because I want to use aggregate function without tables - I'm only reporting this because it could hide some deeper anomaly. | |||||||||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2018-08-03 ] | |||||||||||||||||||||||||||||||||||||
|
Revised Patch |