[MDEV-15630] uuid() function evaluates at wrong time in query Created: 2018-03-22 Updated: 2018-04-03 Resolved: 2018-04-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2.13, 10.2, 10.3 |
| Fix Version/s: | 5.5.60, 10.0.35, 10.1.33, 10.2.15, 10.3.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Martin Häcker | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Environment: |
Darwin crest.fritz.box 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64 |
||
| Issue Links: |
|
||||||||
| Description |
|
The following code returns one uuid with count 10 instead of 10 uuids with count 1 for each line.
This seems as if the uuid function is only ever actually called once, instead of once for each element in the sequence. This does not happen fi you leave of the group by like this:
To my understanding this is wrong and the sequence should return 10 uuids with a count of one each. |
| Comments |
| Comment by Martin Häcker [ 2018-03-28 ] | |||||||||
|
Hi there, can you reproduce this? | |||||||||
| Comment by Elena Stepanova [ 2018-04-01 ] | |||||||||
|
Reproducible on MariaDB 5.5-10.3 and MySQL 5.5-5.7. Not reproducible on MySQL 8.0. cvicentiu, bar, see also | |||||||||
| Comment by Alexander Barkov [ 2018-04-03 ] | |||||||||
|
The same problem is repeatable with a real table instead of a sequence:
|