[MDEV-14895] Incompatible undocumented change in behavior of VALUES() function Created: 2018-01-08 Updated: 2018-01-10 Resolved: 2018-01-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Description |
|
As documented, function VALUES only makes actual sense in INSERT .. ON DUPLICATE KEY UPDATE statements, and in other cases it returns NULL. It is indeed so with 10.2 (and before, and with MySQL):
However 10.3 does not allow it anymore:
And this works instead:
I suppose it can break various upgrade scenarios, so if it's intentional, hopefully there is a good enough reason for that; in this case, please re-categorize it as a documentation issue. |
| Comments |
| Comment by Sergei Golubchik [ 2018-01-09 ] | |
|
Intentional. It 10.3 we support Table Value Constructors,
This grammar is incompatible with MariaDB non-standard function VALUES(), so the function was renamed to VALUE(). We managed to make the parser to recognize old name VALUES() in the context where this function was supposed to be used, in ON DUPLICATE KEY UPDATE. But in cases where the function VALUES() makes no sense, the parser treats VALUES as a table value constructor. It's a documentation issue. | |
| Comment by Ian Gilfillan [ 2018-01-10 ] | |