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
3743b4c3
Commit
3743b4c3
authored
Dec 06, 2016
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11468 JSON_UNQUOTE returns incorrect results.
Now return the argument's value when error.
parent
0009f4a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+3
-0
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+1
-0
sql/item_jsonfunc.cc
sql/item_jsonfunc.cc
+2
-2
No files found.
mysql-test/r/func_json.result
View file @
3743b4c3
...
...
@@ -277,6 +277,9 @@ drop table t1;
select json_unquote('"abc"');
json_unquote('"abc"')
abc
select json_unquote('abc');
json_unquote('abc')
abc
select json_object("a", json_object("b", "abcd"));
json_object("a", json_object("b", "abcd"))
{"a": {"b": "abcd"}}
...
...
mysql-test/t/func_json.test
View file @
3743b4c3
...
...
@@ -121,6 +121,7 @@ drop table t1;
select
json_unquote
(
'"abc"'
);
select
json_unquote
(
'abc'
);
select
json_object
(
"a"
,
json_object
(
"b"
,
"abcd"
));
select
json_object
(
"a"
,
'{"b": "abcd"}'
);
...
...
sql/item_jsonfunc.cc
View file @
3743b4c3
...
...
@@ -359,8 +359,8 @@ String *Item_func_json_unquote::val_str(String *str)
return
str
;
error:
null_value
=
1
;
return
0
;
/* We just return the argument's value in the case of error. */
return
js
;
}
...
...
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