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
486079d1
Commit
486079d1
authored
Dec 06, 2016
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11440 JSON has become a reserved word in MariaDB.
'JSON' made possible identifier.
parent
3743b4c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+7
-0
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+5
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-2
No files found.
mysql-test/r/func_json.result
View file @
486079d1
...
...
@@ -310,3 +310,10 @@ json_length('{}')
select json_length('[1, 2, {"a": 3}]');
json_length('[1, 2, {"a": 3}]')
3
create table json (j INT);
show create table json;
Table Create Table
json CREATE TABLE `json` (
`j` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table json;
mysql-test/t/func_json.test
View file @
486079d1
...
...
@@ -135,3 +135,8 @@ select json_depth('[[[1,2,3],"s"], {}, []]');
select
json_length
(
''
);
select
json_length
(
'{}'
);
select
json_length
(
'[1, 2, {"a": 3}]'
);
create
table
json
(
j
INT
);
show
create
table
json
;
drop
table
json
;
sql/sql_yacc.yy
View file @
486079d1
...
...
@@ -13235,10 +13235,11 @@ opt_extended_describe:
opt_format_json:
/* empty */ {}
| FORMAT_SYM '=' JSON_SYM { Lex->explain_json= true; }
| FORMAT_SYM '=' ident_or_text
{
if (!my_strcasecmp(system_charset_info, $3.str, "TRADITIONAL"))
if (!my_strcasecmp(system_charset_info, $3.str, "JSON"))
Lex->explain_json= true;
else if (!my_strcasecmp(system_charset_info, $3.str, "TRADITIONAL"))
DBUG_ASSERT(Lex->explain_json==false);
else
my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), $3.str));
...
...
@@ -14738,6 +14739,7 @@ keyword_sp:
| IPC_SYM {}
| ISOLATION {}
| ISSUER_SYM {}
| JSON_SYM {}
| INSERT_METHOD {}
| KEY_BLOCK_SIZE {}
| LAST_VALUE {}
...
...
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