[MDEV-15931] JSON_TYPE doesn't work correctly Created: 2018-04-19 Updated: 2024-01-21 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Nicola Marangoni | Assignee: | Rucha Deodhar |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | json | ||
| Environment: |
Tried on Ubuntu |
||
| Issue Links: |
|
||||||||
| Description |
|
The JSON_TYPE works well with arguments generated by the JSON_QUERY funtions and correctly detect the OBJECT and ARRAY types.
Actually these statements would be sufficient to reproduce:
|
| Comments |
| Comment by Sergei Golubchik [ 2020-07-10 ] | ||||||||||||||||||||
|
JSON_TYPE('abc'); is correct, it's not a JSON string, a valid JSON string is JSON_TYPE('"abc"');. But JSON_TYPE('123a') is incorrectly detected as a valid JSON integer, this is a bug. | ||||||||||||||||||||
| Comment by Janez Resnik [ 2022-08-16 ] | ||||||||||||||||||||
|
Scientific notation is also wrongly detected as integer, should be double: Demo: https://onecompiler.com/mariadb/3yd6efagy
Output:
|