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
48dffa3c
Commit
48dffa3c
authored
Mar 26, 2021
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25155 JSON_TABLE: Status variable Feature_json is not incremented.
feature_json variable incremented.
parent
e2d5eb67
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
27 deletions
+36
-27
mysql-test/main/status.result
mysql-test/main/status.result
+6
-0
mysql-test/main/status.test
mysql-test/main/status.test
+2
-0
sql/item_create.cc
sql/item_create.cc
+26
-26
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-1
No files found.
mysql-test/main/status.result
View file @
48dffa3c
...
...
@@ -438,6 +438,12 @@ json_valid('123')
SHOW STATUS LIKE 'Feature_json';
Variable_name Value
Feature_json 1
select * from json_table ('{}', '$' COLUMNS(x FOR ORDINALITY)) a;
x
1
SHOW STATUS LIKE 'Feature_json';
Variable_name Value
Feature_json 2
connection default;
set @@global.concurrent_insert= @old_concurrent_insert;
SET GLOBAL log_output = @old_log_output;
mysql-test/main/status.test
View file @
48dffa3c
...
...
@@ -436,6 +436,8 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME
SHOW
STATUS
LIKE
'Feature_json'
;
select
json_valid
(
'123'
);
SHOW
STATUS
LIKE
'Feature_json'
;
select
*
from
json_table
(
'{}'
,
'$'
COLUMNS
(
x
FOR
ORDINALITY
))
a
;
SHOW
STATUS
LIKE
'Feature_json'
;
# Restore global concurrent_insert value. Keep in the end of the test file.
--
connection
default
...
...
sql/item_create.cc
View file @
48dffa3c
...
...
@@ -3577,7 +3577,7 @@ Create_func_json_exists Create_func_json_exists::s_singleton;
Item
*
Create_func_json_exists
::
create_2_arg
(
THD
*
thd
,
Item
*
arg1
,
Item
*
arg2
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_exists
(
thd
,
arg1
,
arg2
);
}
...
...
@@ -3603,7 +3603,7 @@ Create_func_json_detailed::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_format
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3613,7 +3613,7 @@ Create_func_json_loose Create_func_json_loose::s_singleton;
Item
*
Create_func_json_loose
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_format
(
thd
,
arg1
,
Item_func_json_format
::
LOOSE
);
}
...
...
@@ -3624,7 +3624,7 @@ Create_func_json_compact Create_func_json_compact::s_singleton;
Item
*
Create_func_json_compact
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_format
(
thd
,
arg1
,
Item_func_json_format
::
COMPACT
);
}
...
...
@@ -3635,7 +3635,7 @@ Create_func_json_valid Create_func_json_valid::s_singleton;
Item
*
Create_func_json_valid
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_valid
(
thd
,
arg1
);
}
...
...
@@ -3645,7 +3645,7 @@ Create_func_json_type Create_func_json_type::s_singleton;
Item
*
Create_func_json_type
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_type
(
thd
,
arg1
);
}
...
...
@@ -3655,7 +3655,7 @@ Create_func_json_depth Create_func_json_depth::s_singleton;
Item
*
Create_func_json_depth
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_depth
(
thd
,
arg1
);
}
...
...
@@ -3665,7 +3665,7 @@ Create_func_json_value Create_func_json_value::s_singleton;
Item
*
Create_func_json_value
::
create_2_arg
(
THD
*
thd
,
Item
*
arg1
,
Item
*
arg2
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_value
(
thd
,
arg1
,
arg2
);
}
...
...
@@ -3675,7 +3675,7 @@ Create_func_json_query Create_func_json_query::s_singleton;
Item
*
Create_func_json_query
::
create_2_arg
(
THD
*
thd
,
Item
*
arg1
,
Item
*
arg2
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_query
(
thd
,
arg1
,
arg2
);
}
...
...
@@ -3685,7 +3685,7 @@ Create_func_json_quote Create_func_json_quote::s_singleton;
Item
*
Create_func_json_quote
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_quote
(
thd
,
arg1
);
}
...
...
@@ -3695,7 +3695,7 @@ Create_func_json_unquote Create_func_json_unquote::s_singleton;
Item
*
Create_func_json_unquote
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
new
(
thd
->
mem_root
)
Item_func_json_unquote
(
thd
,
arg1
);
}
...
...
@@ -3726,7 +3726,7 @@ Create_func_json_array::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_array
(
thd
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3752,7 +3752,7 @@ Create_func_json_array_append::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_array_append
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3778,7 +3778,7 @@ Create_func_json_array_insert::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_array_insert
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3805,7 +3805,7 @@ Create_func_json_insert::create_native(THD *thd, LEX_CSTRING *name,
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3832,7 +3832,7 @@ Create_func_json_set::create_native(THD *thd, LEX_CSTRING *name,
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3859,7 +3859,7 @@ Create_func_json_replace::create_native(THD *thd, LEX_CSTRING *name,
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3885,7 +3885,7 @@ Create_func_json_remove::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_remove
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3918,7 +3918,7 @@ Create_func_json_object::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_object
(
thd
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3943,7 +3943,7 @@ Create_func_json_length::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_length
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -3968,7 +3968,7 @@ Create_func_json_merge::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_merge
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -4018,7 +4018,7 @@ Create_func_json_contains::create_native(THD *thd, LEX_CSTRING *name,
my_error
(
ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
,
MYF
(
0
),
name
->
str
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -4044,7 +4044,7 @@ Create_func_json_keys::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_keys
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -4070,7 +4070,7 @@ Create_func_json_contains_path::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_contains_path
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -4096,7 +4096,7 @@ Create_func_json_extract::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_extract
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
@@ -4122,7 +4122,7 @@ Create_func_json_search::create_native(THD *thd, LEX_CSTRING *name,
func
=
new
(
thd
->
mem_root
)
Item_func_json_search
(
thd
,
*
item_list
);
}
status_var_increment
(
current_
thd
->
status_var
.
feature_json
);
status_var_increment
(
thd
->
status_var
.
feature_json
);
return
func
;
}
...
...
sql/sql_yacc.yy
View file @
48dffa3c
...
...
@@ -539,7 +539,7 @@ End SQL_MODE_ORACLE_SPECIFIC */
%token <kwd> GROUP_CONCAT_SYM
%token <rwd> JSON_ARRAYAGG_SYM
%token <rwd> JSON_OBJECTAGG_SYM
%token <
r
wd> JSON_TABLE_SYM
%token <
k
wd> JSON_TABLE_SYM
%token <kwd> GROUP_SYM /* SQL-2003-R */
%token <kwd> HAVING /* SQL-2003-R */
%token <kwd> HOUR_MICROSECOND_SYM
...
...
@@ -11714,6 +11714,7 @@ table_function:
0,0,0, Lex->json_table)))
MYSQL_YYABORT;
Lex->json_table= 0;
status_var_increment(thd->status_var.feature_json);
}
;
...
...
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