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
1f372cf1
Commit
1f372cf1
authored
Feb 13, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to work
remove CAST(... AS JSON) from the grammar for 10.2.4
parent
87075e7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
13 deletions
+3
-13
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+0
-9
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+3
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+0
-1
No files found.
mysql-test/r/func_json.result
View file @
1f372cf1
...
...
@@ -402,15 +402,6 @@ json_object("a", json_object("b", "abcd"))
select json_object("a", '{"b": "abcd"}');
json_object("a", '{"b": "abcd"}')
{"a": "{\"b\": \"abcd\"}"}
select json_object("a", cast('{"b": "abcd"}' as json));
json_object("a", cast('{"b": "abcd"}' as json))
{"a": {"b": "abcd"}}
select cast(NULL AS JSON);
cast(NULL AS JSON)
NULL
select json_depth(cast(NULL as JSON));
json_depth(cast(NULL as JSON))
NULL
select json_depth('[[], {}]');
json_depth('[[], {}]')
2
...
...
mysql-test/t/func_json.test
View file @
1f372cf1
...
...
@@ -161,10 +161,10 @@ select json_unquote('abc');
select
json_object
(
"a"
,
json_object
(
"b"
,
"abcd"
));
select
json_object
(
"a"
,
'{"b": "abcd"}'
);
select
json_object
(
"a"
,
cast
(
'{"b": "abcd"}'
as
json
));
#
select json_object("a", cast('{"b": "abcd"}' as json));
select
cast
(
NULL
AS
JSON
);
select
json_depth
(
cast
(
NULL
as
JSON
));
#
select cast(NULL AS JSON);
#
select json_depth(cast(NULL as JSON));
select
json_depth
(
'[[], {}]'
);
select
json_depth
(
'[[[1,2,3],"s"], {}, []]'
);
select
json_depth
(
'[10, {"a": 20}]'
);
...
...
sql/sql_yacc.yy
View file @
1f372cf1
...
...
@@ -10714,7 +10714,6 @@ cast_type:
}
| cast_type_numeric { $$= $1; Lex->charset= NULL; }
| cast_type_temporal { $$= $1; Lex->charset= NULL; }
| JSON_SYM { $$.set(ITEM_CAST_JSON); }
;
cast_type_numeric:
...
...
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