Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.13, 10.2(EOL), 10.3(EOL)
-
None
-
tested with MariaDB 10.2.13 on Debian 8
-
10.3.6-1
Description
json_extract returns NULL for a number in scientific notation.
MariaDB [(none)]> select json_extract('{"test":8.437e-5}','$.test'); |
+--------------------------------------------+
|
| json_extract('{"test":8.437e-5}','$.test') | |
+--------------------------------------------+
|
| NULL |
|
+--------------------------------------------+
|
with the following warning
MariaDB [(none)]> show warnings;
|
+---------+------+----------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------------------------------+
|
| Warning | 4038 | Syntax error in JSON text in argument 1 to function 'json_extract' at position 8 | |
+---------+------+----------------------------------------------------------------------------------+
|
|
json value works.
+------------------------------------------+
|
| json_value('{"test":8.437e-5}','$.test') | |
+------------------------------------------+
|
| 8.437e-5 | |
+------------------------------------------+
|
1 row in set (0.00 sec) |
|
json_valid returns true for the given document
MariaDB [(none)]> select json_valid('{"test":8.437e-5}'); |
+---------------------------------+
|
| json_valid('{"test":8.437e-5}') | |
+---------------------------------+
|
| 1 | |
+---------------------------------+
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
json_extract returns NULL for a number in scientific notation.
{code:java} MariaDB [(none)]> select json_extract('{"test":8.437e-5}','$.test'); +--------------------------------------------+ | json_extract('{"test":8.437e-5}','$.test') | +--------------------------------------------+ | NULL | +--------------------------------------------+ {code} json value works. {code:java} +------------------------------------------+ | json_value('{"test":8.437e-5}','$.test') | +------------------------------------------+ | 8.437e-5 | +------------------------------------------+ 1 row in set (0.00 sec) {code} json_valid returns true for the given document {code:java} MariaDB [(none)]> select json_valid('{"test":8.437e-5}'); +---------------------------------+ | json_valid('{"test":8.437e-5}') | +---------------------------------+ | 1 | +---------------------------------+ {code} |
json_extract returns NULL for a number in scientific notation.
{code:java} MariaDB [(none)]> select json_extract('{"test":8.437e-5}','$.test'); +--------------------------------------------+ | json_extract('{"test":8.437e-5}','$.test') | +--------------------------------------------+ | NULL | +--------------------------------------------+ {code} with the following warning {code:java} MariaDB [(none)]> show warnings; +---------+------+----------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------------------------------------------------+ | Warning | 4038 | Syntax error in JSON text in argument 1 to function 'json_extract' at position 8 | +---------+------+----------------------------------------------------------------------------------+ {code} json value works. {code:java} +------------------------------------------+ | json_value('{"test":8.437e-5}','$.test') | +------------------------------------------+ | 8.437e-5 | +------------------------------------------+ 1 row in set (0.00 sec) {code} json_valid returns true for the given document {code:java} MariaDB [(none)]> select json_valid('{"test":8.437e-5}'); +---------------------------------+ | json_valid('{"test":8.437e-5}') | +---------------------------------+ | 1 | +---------------------------------+ {code} |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Assignee | Alexey Botchkov [ holyfoot ] |
Sprint | 10.3.6-0 [ 237 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2018-03-24 21:04:01.0 | 2018-03-24 21:04:01.724 |
Fix Version/s | 10.3.6 [ 23003 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 86020 ] | MariaDB v4 [ 153953 ] |
Zendesk Related Tickets | 127099 |
MySQL works:
| 0.00008437 |