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
f701ac65
Commit
f701ac65
authored
Aug 07, 2017
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12324 Wrong result (phantom array value) on JSON_EXTRACT.
Fixed the path comparison.
parent
4ff6ebf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+6
-0
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+6
-0
strings/json_lib.c
strings/json_lib.c
+1
-1
No files found.
mysql-test/r/func_json.result
View file @
f701ac65
...
...
@@ -642,3 +642,9 @@ SELECT JSON_KEYS(f) FROM t1 ORDER BY 1;
JSON_KEYS(f)
NULL
DROP TABLE t1;
SELECT JSON_EXTRACT( '{"foo":"bar"}', '$[*].*' );
JSON_EXTRACT( '{"foo":"bar"}', '$[*].*' )
NULL
SELECT JSON_EXTRACT( '{"foo":"bar"}', '$[*]' );
JSON_EXTRACT( '{"foo":"bar"}', '$[*]' )
NULL
mysql-test/t/func_json.test
View file @
f701ac65
...
...
@@ -296,3 +296,9 @@ INSERT INTO t1 VALUES (0);
SELECT
JSON_KEYS
(
f
)
FROM
t1
ORDER
BY
1
;
DROP
TABLE
t1
;
#
# MDEV-12324 Wrong result (phantom array value) on JSON_EXTRACT.
#
SELECT
JSON_EXTRACT
(
'{"foo":"bar"}'
,
'$[*].*'
);
SELECT
JSON_EXTRACT
(
'{"foo":"bar"}'
,
'$[*]'
);
strings/json_lib.c
View file @
f701ac65
...
...
@@ -1756,7 +1756,7 @@ int json_path_parts_compare(
goto
step_fits
;
goto
step_failed
;
}
if
(
a
->
n_item
==
0
)
if
(
(
a
->
type
&
JSON_PATH_WILD
)
==
0
&&
a
->
n_item
==
0
)
goto
step_fits_autowrap
;
goto
step_failed
;
}
...
...
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