[MDEV-22296] JSON_TABLE: Ordinality is calculated incorrectly (counts all rows instead of rows at its level) Created: 2020-04-18 Updated: 2020-04-25 Resolved: 2020-04-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Basic example:
Aside ordinality values starting from a wrong value in MariaDB, note them growing in MariaDB and staying the same in MySQL:
Here is a more meaningful example taken from stackoverflow, with minimal changes to make it applicable to MySQL/MariaDB syntax. See the discussion there.
Note u_lvl and l_lvl columns:
Result on MySQL 8.0 matches the expected result from stackoverflow, where the expectation was confirmed to be correct:
|
| Comments |
| Comment by Alexey Botchkov [ 2020-04-25 ] | |||||||||||||||
|
Dunno. The standard doesn't say much how this all is supposed to work. I decided to do it in simplest possible way.
|