Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d702e463
Commit
d702e463
authored
Mar 25, 2018
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15561 json_extract returns NULL with numbers in scientific notation.
Scientific notation handling fixed.
parent
7003067a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
32 deletions
+21
-32
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+3
-0
mysql-test/suite/json/r/json_no_table.result
mysql-test/suite/json/r/json_no_table.result
+10
-30
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+6
-0
strings/json_lib.c
strings/json_lib.c
+2
-2
No files found.
mysql-test/r/func_json.result
View file @
d702e463
...
...
@@ -736,3 +736,6 @@ insert into t1 values (2),(1);
select 1 from t1 where json_extract(a,'$','$[81]');
1
drop table t1;
select json_extract('{"test":8.437e-5}','$.test');
json_extract('{"test":8.437e-5}','$.test')
8.437e-5
mysql-test/suite/json/r/json_no_table.result
View file @
d702e463
No preview for this file type
mysql-test/t/func_json.test
View file @
d702e463
...
...
@@ -392,3 +392,9 @@ insert into t1 values (2),(1);
select
1
from
t1
where
json_extract
(
a
,
'$'
,
'$[81]'
);
drop
table
t1
;
#
# MDEV-15561 json_extract returns NULL with numbers in scientific notation.
#
select
json_extract
(
'{"test":8.437e-5}'
,
'$.test'
);
strings/json_lib.c
View file @
d702e463
...
...
@@ -475,8 +475,8 @@ static int json_num_states[NS_NUM_STATES][N_NUM_CLASSES]=
/*ZE1*/
{
JE_SYN
,
JE_SYN
,
JE_SYN
,
JE_SYN
,
NS_FRAC
,
JE_SYN
,
NS_OK
,
JE_BAD_CHR
},
/*INT*/
{
JE_SYN
,
JE_SYN
,
NS_INT
,
NS_INT
,
NS_FRAC
,
NS_EX
,
NS_OK
,
JE_BAD_CHR
},
/*FRAC*/
{
JE_SYN
,
JE_SYN
,
NS_FRAC
,
NS_FRAC
,
JE_SYN
,
NS_EX
,
NS_OK
,
JE_BAD_CHR
},
/*EX*/
{
NS_EX
1
,
NS_EX1
,
NS_EX1
,
NS_EX1
,
JE_SYN
,
JE_SYN
,
JE_SYN
,
JE_BAD_CHR
},
/*EX1*/
{
JE_SYN
,
JE_SYN
,
NS_EX1
,
NS_EX1
,
JE_SYN
,
JE_SYN
,
JE_SYN
,
JE_BAD_CHR
}
/*EX*/
{
NS_EX
,
NS_EX
,
NS_EX1
,
NS_EX1
,
JE_SYN
,
JE_SYN
,
JE_SYN
,
JE_BAD_CHR
},
/*EX1*/
{
JE_SYN
,
JE_SYN
,
NS_EX1
,
NS_EX1
,
JE_SYN
,
JE_SYN
,
NS_OK
,
JE_BAD_CHR
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment