mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1.
Produce syntax error when '{...]'.
This commit is contained in:
parent
a12b8ac8e9
commit
b290ef8c76
3 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]' );
|
||||
|
||||
|
|
|
|||
|
|
@ -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*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue