[MDEV-18284] JSON casting using JSON_COMPACT doesn't always work with values from subqueries Created: 2019-01-17 Updated: 2022-01-19 Resolved: 2022-01-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON, Server |
| Affects Version/s: | 10.3.12, 10.2, 10.3 |
| Fix Version/s: | 10.2.42, 10.3.33, 10.4.23 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Heinz Wiesinger | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | JSON | ||
| Description |
|
Given this test data
I can observe the following behavior:
The output of `JSON_COMPACT(a)` is sometimes treated as JSON and sometimes as a plain string |
| Comments |
| Comment by Alice Sherepa [ 2019-01-17 ] | |||||||||||||||||||||||
|
Thanks for the report! Reproducible on 10.2-10.3
| |||||||||||||||||||||||
| Comment by Anel Husakovic [ 2019-01-20 ] | |||||||||||||||||||||||
|
Actually here is one more problem ; func_item like `json_compact` is not working in `json_object`, so the following will not be good:
Result should be
, right ? | |||||||||||||||||||||||
| Comment by Anel Husakovic [ 2019-01-28 ] | |||||||||||||||||||||||
|
PR#1145 created | |||||||||||||||||||||||
| Comment by Anel Husakovic [ 2021-06-04 ] | |||||||||||||||||||||||
|
julien.fritsch sorry for delay. | |||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2022-01-18 ] | |||||||||||||||||||||||
|
512d81c0f88 is ok to push. | |||||||||||||||||||||||
| Comment by Anel Husakovic [ 2022-01-19 ] | |||||||||||||||||||||||
|
Pushed with 9cd6ecfe501bcbee0 |