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
b290ef8c
Commit
b290ef8c
authored
Nov 12, 2018
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1.
Produce syntax error when '{...]'.
parent
a12b8ac8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
mysql-test/r/func_json.result
mysql-test/r/func_json.result
+6
-0
mysql-test/t/func_json.test
mysql-test/t/func_json.test
+6
-0
strings/json_lib.c
strings/json_lib.c
+1
-1
No files found.
mysql-test/r/func_json.result
View file @
b290ef8c
...
...
@@ -824,3 +824,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
SET sql_mode=default;
#
# MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1
#
select JSON_VALID( '{"a":1]' );
JSON_VALID( '{"a":1]' )
0
mysql-test/t/func_json.test
View file @
b290ef8c
...
...
@@ -481,3 +481,9 @@ SHOW CREATE TABLE t2;
DROP
TABLE
t1
,
t2
;
SET
sql_mode
=
default
;
--
echo
#
--
echo
# MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1
--
echo
#
select
JSON_VALID
(
'{"a":1]'
);
strings/json_lib.c
View file @
b290ef8c
...
...
@@ -774,7 +774,7 @@ static json_state_handler json_actions[NR_JSON_STATES][NR_C_CLASSES]=
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
not_json_chr
,
bad_chr
},
{
/*OBJ_CONT*/
unexpected_eos
,
syntax_error
,
end_object
,
syntax_error
,
end_array
,
unexpected_eos
,
syntax_error
,
end_object
,
syntax_error
,
syntax_error
,
syntax_error
,
next_key
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
syntax_error
,
not_json_chr
,
bad_chr
},
{
/*ARRAY_CONT*/
...
...
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