Commit 486079d1 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-11440 JSON has become a reserved word in MariaDB.

        'JSON' made possible identifier.
parent 3743b4c3
......@@ -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;
......@@ -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;
......@@ -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 {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment